Downloads of v


Last Update:

27 Oct 2020

Package Maintainer(s):

Software Author(s):

  • Christian Schenk


miktex tex latex pdf typesetting foss embedded

MiKTeX (Install) | Updated: 27 Oct 2020



Downloads of v



Software Author(s):

  • Christian Schenk

MiKTeX (Install)

All Checks are Passing

2 Passing Test

Validation Testing Passed

Verification Testing Passed


To install MiKTeX (Install), run the following command from the command line or from PowerShell:


To upgrade MiKTeX (Install), run the following command from the command line or from PowerShell:


To uninstall MiKTeX (Install), run the following command from the command line or from PowerShell:


NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to

4. Choose your deployment method:

choco upgrade miktex.install -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:

choco upgrade miktex.install -y --source="'STEP 3 URL'"

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0

Exit $exitCode

- name: Ensure miktex.install installed
    name: miktex.install
    state: present
    source: STEP 3 URL

See docs at

Coming early 2020! Central Managment Reporting available now! More information...

chocolatey_package 'miktex.install' do
  action    :install
  version  ''
  source   'STEP 3 URL'

See docs at

    Name: miktex.install,
    Source: STEP 3 URL

Requires Otter Chocolatey Extension. See docs at

cChocoPackageInstaller miktex.install
   Name     = 'miktex.install'
   Ensure   = 'Present'
   Version  = ''
   Source   = 'STEP 3 URL'

Requires cChoco DSC Resource. See docs at

package { 'miktex.install':
  provider => 'chocolatey',
  ensure   => '',
  source   => 'STEP 3 URL',

Requires Puppet Chocolatey Provider module. See docs at

salt '*' chocolatey.install miktex.install version="" source="STEP 3 URL"

See docs at

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package is likely a meta/virtual (*) or an installer (*.install) or portable (*.portable) application package.

  • Meta/virtual (*) - has a dependency on the *.install or the *.portable package - it is provided for discoverability and for other packages to take a dependency on.
  • Portable (*.portable/*.commandline (deprecated naming convention)/*.tool (deprecated naming convention)) - usually zips or archives that require no administrative access to install.
  • Install (*.install/*.app (deprecated naming convention)) - uses native installers, usually requires administrative access to install.

Learn more about chocolatey's distinction of installed versus portable apps and/or learn about this kind of package.

This package was approved as a trusted package on 27 Oct 2020.


MiKTeX (pronounced mick-tech) is an up-to-date implementation of TeX/LaTeX and related programs. TeX is a typesetting system written by Donald Ervin Knuth who says that it is intended for the creation of beautiful books - and especially for books that contain a lot of mathematics.

MiKTeX comes with TeXworks, a TeX frontend which you can use it to edit and preview LaTeX documents.

The sky is the limit when it comes to TeX/LaTeX, with drawings, chemical equations, syntax trees, circuit diagrams, mathematical expressions, proof systems, chessboards and more! (Image source)

MiKTeX's integrated package manager installs missing components from the Internet, if required.

Package Set Parameter (optional)

  • /Set:(option) - Download and install the essential, basic (default), or complete set of TeX packages/tools.

Custom Repository Parameter (optional)

This package has only the MiKTeX setup utility embedded. Any new install of MiKTeX involves using the setup utility to download and create a (temporary by default) repository and then installing from that repository. This Chocolatey package can both establish a more permenant repository (for sharing with other computers) and use a specific (possibly private) repository from which to install MiKTeX. Thus a single computer within a network could download MiKTeX from the internet and create a repository, and all other computers on the network could use that repository to install MiKTeX saving external bandwidth.

Using a Custom Repository:

  • /RepoPath:(path) - with a share or URL as (path). This will install or update MiKTeX from a specific existing repository. No attempt to update the repository itself will be made. Upgrades should use this repository in the future by default.

Creating a Custom Repository:

  • /RepoPath:(path) - with a local directory as (path). This will create (or update) the repository in the (non-temporary) location. MiKTeX will also be installed. Note: The repository will not be shared or accessible through a URL without additional administrator actions and will not be removed on an uninstall.


choco install miktek.install --params '"/Set:complete /RepoPath:""c:\Shared Files\MiKTeX-Repo"""'
Double-double quotes (i.e. ""path"") are necessary for paths containing a space.

choco install miktek.install --params '"/RepoPath:"'

$ErrorActionPreference = 'Stop'

$PackageMileStone = '20.10'

$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$ZipFiles = Get-ChildItem $toolsDir '*.zip' |Select-Object -ExpandProperty FullName

$ZipArgs = @{
   PackageName    = $env:ChocolateyPackageName
   FileFullPath   = $ZipFiles | Where-Object {$_ -notmatch 'x64'}
   FileFullPath64 = $ZipFiles | Where-Object {$_ -match 'x64'}
   Destination    = $toolsDir
$null = Get-ChocolateyUnzip @ZipArgs

$MiKTeXsetup = Get-ChildItem $toolsDir 'miktexsetup.exe' | Select-Object -ExpandProperty FullName
$null = New-Item -Path "$MiKTeXsetup.ignore" -ItemType file -Force

$pp = Get-PackageParameters

# What kind of install?
Switch ($pp['set']) {
   'essential' { $set = 'essential'
                  $msg = 'Downloading a "Essential" package set to install.'; break }
   'complete'  { $set = 'complete'
                  $msg = 'Downloading a "Complete" package set to install.\n' + 
                         'This is large and may take some time.  Please be patient.'; break }
   default     { $set = 'basic'
                  $msg = 'Downloading a "Basic" package set to install.'; break }
Write-Host $msg -ForegroundColor Cyan

$LocalRepo = $false
$Repository = ''
if ($pp['RepoPath']) {
   $LocalRepo = -not (([uri]($pp['RepoPath'])).hostnametype.tostring().equals('Dns'))
   $Repository = $pp['RepoPath']

# Is MiKTeX already installed?
[array]$key = Get-UninstallRegistryKey -SoftwareName 'miktex*' 
if ($key.Count -gt 1) {
   Throw 'More than one install of MiKTeX already exists!'
} elseif ($key.Count -eq 1) {
   Write-Verbose "Found an install of MiKTeX."
   # Use MiKTeX's built-in updater
   $InstallDir = split-path ($key.UninstallString.split('"')[1])
   $InitEXMF = Join-Path $InstallDir 'initexmf.exe'
   Write-Verbose "Running 'initexmf.exe' to identify installed milestone."
   $MileStoneLine = & $InitEXMF --admin --report | Where-Object {$_ -match '^(CurrentVersion|MiKTeX):'}
   $MileStone = $MileStoneLine.split()[-1]
   Write-Host "Found MiKTeX milestone $MileStone currently installed." -ForegroundColor Cyan

   If (([Version]$MileStone -lt [Version]$PackageMileStone) -or $env:ChocolateyForce) {
      Write-Host 'Updating to the latest MiKTeX milestone.' -ForegroundColor Cyan

      if ($LocalRepo) {
         if (test-path $Repository) {
            Write-Verbose "Updating local MiKTeX repository at '$Repository'."
         } else {
            Write-Verbose "Local MiKTeX repository not found.  Creating one at '$Repository'."
         $DownloadArgs = @{
            Statements       = "--verbose --local-package-repository=`"$Repository`" --package-set=$set download "
            ExetoRun         = $MiKTeXsetup
            WorkingDirectory = $toolsDir
            validExitCodes   = @(0)
         $exitCode = Start-ChocolateyProcessAsAdmin @DownloadArgs
         if ($exitCode -ne 0) {
            Throw 'Local Repository failure!'

      $MPM = Join-Path $InstallDir 'mpm.exe'
      if ($Repository -ne '') { $RepoSwitch = "--repository=`"$Repository`"" }
      $SetupArgs = @{
         Statements       = "--admin --verbose --update $RepoSwitch"
         ExetoRun         = $MPM
         WorkingDirectory = $InstallDir
         validExitCodes   = @(0)
      $exitCode = Start-ChocolateyProcessAsAdmin @SetupArgs
   } else {
      Write-Verbose "Installed Milestone of MiKTeX is the same or newer than this package version."

} elseif ($key.Count -eq 0) {
   # MiKTeX install requires a repository
   if ($Repository -eq '') {
      # Use a temporary repository if one not given
      $Repository = Join-Path $env:TEMP 'MiKTeX-repository'
      $LocalRepo = $true
      $Temporary = " temporary"

   if ($LocalRepo) {
      $RepoSwitch = "--local-package-repository=`"$Repository`""

      # Only create a repository if it is local; remote repositories need to be updated independently.
      Write-Host "Creating a$Temporary repository at '$Repository'."
      $DownloadArgs = @{
         Statements       = "--verbose $RepoSwitch --package-set=$set download "
         ExetoRun         = $MiKTeXsetup
         WorkingDirectory = $toolsDir
         validExitCodes   = @(0)
      $exitCode = Start-ChocolateyProcessAsAdmin @DownloadArgs
      if ($exitCode -ne 0) {
         Throw 'Local Repository failure!'
   } else {
      $RepoSwitch = "--Remote-package-repository=`"$Repository`""

   # Now, do the actual install from identified repository
   Write-Host "Installing from$Temporary MiKTeX repository."
   $InstallArgs = @{
      Statements       = "--verbose $RepoSwitch --package-set=$set --shared install "
      ExetoRun         = $MiKTeXsetup
      WorkingDirectory = $toolsDir
      validExitCodes   = @(0)
   $exitCode = Start-ChocolateyProcessAsAdmin @InstallArgs
   if ($exitCode -ne 0) {
      Throw "MiKTeX setup utility failed to install MiKTeX with error, $exitCode"

# Once installed/updated, confirm it's the correct milestone.
[array]$key = Get-UninstallRegistryKey -SoftwareName 'miktex*'
$InstallDir = split-path ($key.UninstallString.split('"')[1])
$InitEXMF = Join-Path $InstallDir 'initexmf.exe'
Write-Verbose "Using 'initexmf.exe' to identify installed milestone."
$MileStoneLine = & "$InitEXMF" --admin --report | Where-Object {$_ -match '^CurrentVersion:'}
$MileStone = $MileStoneLine.split()[-1]
Write-Verbose "Verified MiKTeX milestone $MileStone installed."
If ([version]$MileStone -lt [version]$PackageMileStone) {
   Throw "Repository was unable to provide MiKTeX milestone $PackageMileStone"

# configure MiKTeX to automatically install missing packages on the fly
Write-Verbose 'Adjusting settings so MiKTeX installs missing packages on the fly.'
$SetupArgs = @{
   Statements       = '--admin --verbose --set-config-value=[MPM]AutoInstall=1'
   ExetoRun         = $InitEXMF
   WorkingDirectory = $InstallDir
   validExitCodes   = @(0)
$exitCode = Start-ChocolateyProcessAsAdmin @SetupArgs

$ErrorActionPreference = 'Stop'

# Is MiKTeX already installed?
[array]$key = Get-UninstallRegistryKey -SoftwareName 'miktex*' 
if ($key.Count -gt 1) {
   Throw 'More than one install of MiKTeX found!  Cannot uninstall without risking other copies.'
} elseif ($key.Count -eq 1) {
   Write-Verbose "Found an install of MiKTeX."
   # Use MiKTeX's built-in updater
   $InstallDir = split-path ($key.UninstallString.split('"')[1])
   $MiKTeXsetup = Join-Path $InstallDir 'miktexsetup.exe'
   Write-Verbose 'Uninstalling MiKTeX using integrated setup utility.'
   $InstallArgs = @{
      Statements       = '--verbose --shared=yes uninstall'
      ExetoRun         = $MiKTeXsetup
      WorkingDirectory = $InstallDir
      validExitCodes   = @(0)
   $exitCode = Start-ChocolateyProcessAsAdmin @InstallArgs
   Write-Verbose "MiKTeX uninstall process exited with:  $exitCode"

   # Sometimes items are left behind
   if (Test-Path "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\MiKTeX") {
      Remove-Item "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\MiKTeX" -Force -Recurse


_The following article is an adaption of the article “Copying
conditions for TeX Live” (reference given at the end)._

## Copying conditions for MiKTeX

To the best of our knowledge, all software in the MiKTeX distribution
is freely redistributable (libre, that is, not necessarily gratis),
within the Free Software Foundation's definition and the Debian Free
Software Guidelines. Where the two conflict, we generally follow the
FSF. If you find any non-free files included, please contact us
(reference given at the end).

That said, MiKTeX has neither a single copyright holder nor a single
license covering its entire contents, since it is a collection of many
independent packages. Therefore, you may copy, modify, and/or
redistribute software from MiKTeX only if you comply with the
requirements placed thereon by the owners of the respective packages.

To most easily learn these requirements, we suggest checking the
MiKTeX package catalogue (reference given at the end). Of course the
legal statements within the packages themselves are the final

### Guidelines for redistribution

In general, you may redistribute MiKTeX, with or without modification,
for profit or not, according to the usual free software tenets. Here
are some general guidelines for doing this:

* If you make any changes to the MiKTeX distribution or any package it
  contains, besides complying with any licensing requirements, you
  must prominently mention such changes in your modified distribution
  so that users do not take your work for ours, and know to contact
  you, not us, in case of questions or problems.

* Especially (but not necessarily) if changes or additions are made,
  we recommend a clearly different title, such as “Your work, based on
  MiKTeX x.y.zzzz”, where x.y.zzzz is the Git tag of the MiKTeX
  version you are using. This credits both our work and yours.

* You absolutely may not place your own copyright on the entire
  distribution, since it is not your work. Statements such as “all
  rights reserved” and “may not be reproduced” are especially
  reprehensible, since they are antithetical to the free software
  principles under which MiKTeX is produced.

* You may use any cover or media label designs that you wish. Such
  packaging and marketing details are not covered by any MiKTeX

* Finally, we make the following requests (not legal requirements):

  a. Acknowledging that the MiKTeX distribution is developed as a
     joint effort by all TeX user groups, and encouraging the
     user/reader to join their user group of choice, as listed on the
     web page <>.

  b. Referencing the MiKTeX project page: <>.

  Such information may be placed on the label of your media, your
  cover, and/or in accompanying text (for instance, in the
  acknowledgements section of a book).

Finally, although it is certainly not a requirement, we'd like to
invite any redistributors to make a donation to the project, whether
cash or in-kind, for example via
<>. Thanks.

### References

1. MiKTeX project contact form: <>
2. MiKTeX package catalogue: <>
3. Copying conditions for TeX Live: <>
4. The FSF's free software definition: <>
5. Debian Free Software Guidelines: <>
6. FSF commentary on existing licenses: <>
md5: 9A651A9F0A46C6FACF2AB61325065C39 | sha1: 84CF3E75BAA8DAA6E5F9906F0567E978DB1036C4 | sha256: 9BE965A35DC917DD6C901B816452BBF41AB4C88E24D90AC1DE245F6EDEA2AA20 | sha512: F0CC30636D9E05D63A0111E678A0DC2D3A0D3A99F833AE8EABF12A52AA6DFB29B01FB2CAE0FCE45E9D477D6568683BB29A473D2C458808F67349F81015AC8419
md5: 8DC956775979FAD61237A071FA9954D2 | sha1: B5F5F2F0E5B1D179A3A869401B091781FA5F2F77 | sha256: F85C47E92360B9089FE854896F6F156CEE21EC263B3A0603988880750AB50D54 | sha512: 0F51368532ECDB2E4884E8ED54E9514AD906B191DD2E80A5A9EB0815898228C0C30BB05804AC4BDA6D69725182AD929AC52AA952747E37E4110CA7AE874C02CD
Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.
The embedded MiKTeX setup utility (which does NOT contain all the 
sub-packages that make up a MiKTeX installation) is available here:
With the "All Downloads" tab displayed, expand the 32-bit and/or 64-bit
"MiKTeX Setup Utility" sections.  There you can see the SHA-256 hash,
and get the file via the "Download" button.

Direct Download:
Milestone       = '20.10'
32-bit URL      = ''
32-bit checksum = 'F85C47E92360B9089FE854896F6F156CEE21EC263B3A0603988880750AB50D54'
64-bit URL      = ''
64-bit checksum = '9BE965A35DC917DD6C901B816452BBF41AB4C88E24D90AC1DE245F6EDEA2AA20'

Note that the version of the Chocolatey package identifies the MiKTeX 
"milestone", not the version of the setup utility embedded in the package.
They are not always the same version.

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
MiKTeX (Install) 20.10 1799 Sunday, October 25, 2020 Approved
MiKTeX (Install) 20.7 9040 Saturday, August 8, 2020 Approved
MiKTeX (Install) 108 Tuesday, July 28, 2020 Approved
MiKTeX (Install) 20.6.29 6315 Sunday, July 19, 2020 Approved
MiKTeX (Install) 20.6 26 Sunday, July 19, 2020 Approved
MiKTeX (Install) 2.9.7440 4248 Tuesday, June 23, 2020 Approved
MiKTeX (Install) 2.9.7269 38392 Thursday, November 28, 2019 Approved
MiKTeX (Install) 2.9.7152 26701 Tuesday, August 6, 2019 Approved
MiKTeX (Install) 2.9.7100 14309 Tuesday, June 11, 2019 Approved

This package has no dependencies.

Discussion for the MiKTeX (Install) Package

Ground Rules:

  • This discussion is only about MiKTeX (Install) and the MiKTeX (Install) package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or MiKTeX (Install), or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus