Downloads of v 22.3:


Last Update:

26 Mar 2022

Package Maintainer(s):

Software Author(s):

  • Christian Schenk


miktex tex latex pdf typesetting foss embedded

MiKTeX (Install)

  • 1
  • 2
  • 3

22.3 | Updated: 26 Mar 2022



Downloads of v 22.3:



Software Author(s):

  • Christian Schenk

  • 1
  • 2
  • 3
MiKTeX (Install) 22.3

  • 1
  • 2
  • 3

All Checks are Passing

3 Passing Tests

Validation Testing Passed

Verification Testing Passed


Scan Testing Successful:

No detections found in any package files

Learn More

Deployment Method: Individual Install, Upgrade, & Uninstall

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:


Deployment Method:

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

1. Enter Your Internal Repository Url

(this should look similar to

2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • 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. Copy Your Script

choco upgrade miktex.install -y --source="'INTERNAL REPO 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="'INTERNAL REPO URL'" 

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

Exit $exitCode

- name: Install miktex.install
    name: miktex.install
    version: '22.3'
    state: present

See docs at

chocolatey_package 'miktex.install' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '22.3'

See docs at

cChocoPackageInstaller miktex.install
    Name     = "miktex.install"
    Version  = "22.3"
    Source   = "INTERNAL REPO URL"

Requires cChoco DSC Resource. See docs at

package { 'miktex.install':
  ensure   => '22.3',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',

Requires Puppet Chocolatey Provider module. See docs at

4. 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 26 Mar 2022.


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.
  • /Mirror:(URL) - This will use the (url), a CTAN mirror to download MiKTeX. It is recommended to only use this if the default mirror as chosen by the MiKTeX setup utility doesn't work for some reason.* Hint: Including /Mirror (valid or not) will write the list of "official", URLs to the Chocolatey log.
  • /ThisUser - This will install MiKTeX for only this user. **Note: This can cause confusion for other users as Chocolatey will claim MiKTeX is installed but other users will (potentially) not be able to see/use it.

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 local or UNC 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. Note: If both /RepoPath (with a UNC path) and /Mirror are used, /Mirror will be ignored.

Creating a Custom Repository:

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


  • On a server, you might use:

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

  • On a workstation in the same network, you might use:

choco install miktex.install --params '"/RepoPath:\\localserver\MiKTeX-Repo"'

$ErrorActionPreference = 'Stop'

$PackageMileStone = '22.3'

$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
# Remove any previously unzipped installers
Get-ChildItem $toolsDir -Filter *.exe -Recurse | ForEach-Object { Remove-Item $_.fullname -Force }

$ZipFiles = Get-ChildItem -Path $toolsDir -Filter '*.zip' | Sort-Object LastWriteTime | Select-Object -ExpandProperty FullName -Last 2 

$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' -Recurse | Select-Object -ExpandProperty FullName
Write-Verbose "Found setup utility:  $MiKTeXsetup"
$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 = ''
$Mirror = ''
if ($pp['RepoPath']) {
   $LocalRepo = -not (([uri]($pp['RepoPath'])).hostnametype.tostring().equals('Dns'))
   $Repository = $pp['RepoPath']
   if (-not $LocalRepo) {
      if ($Repository -match '^(https?:|ftp:)') {
         Throw "RepoPath must be a local or UNC path!"
# Include a list of mirrors in logs if Mirror is called
if ($pp['Mirror']) {
   $List = & $MiKTeXsetup --list-repositories
   $List = $List -join "`n`t"
   Write-Verbose "`nRegistered repositories:`n`t$list"
   $Mirror = $pp['Mirror']
   Write-Verbose "Attempting to download from specified mirror:  $Mirror"
   $MirrorSwitch = "--remote-package-repository=`"$Mirror`""
} else { $MirrorSwitch = '' }

# 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) {
   if ($key.PSPath -match 'HKEY_CURRENT_USER') { $admin = '' } else { $admin = '--admin' }
   # Use MiKTeX's built-in updater
   $InstallDir = (Split-Path $key.UninstallString).trim('"')
   Write-Verbose "Found an install of MiKTeX at '$InstallDir'."
   $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`" $MirrorSwitch --package-set=$set download "
            ExetoRun         = $MiKTeXsetup
            WorkingDirectory = $toolsDir
            validExitCodes   = @(0)
         $exitCode = Start-ChocolateyProcessAsAdmin @DownloadArgs

      $MPM = Join-Path $InstallDir 'mpm.exe'
      if ($Repository -eq '' -and $Mirror -ne '') { $Repository = $Mirror }
      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'

   $RepoSwitch = "--local-package-repository=`"$Repository`""

   if ($LocalRepo) {
      # 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 $MirrorSwitch --package-set=$set download "
         ExetoRun         = $MiKTeXsetup
         WorkingDirectory = $toolsDir
         validExitCodes   = @(0)
      $exitCode = Start-ChocolateyProcessAsAdmin @DownloadArgs

   # Now, do the actual install from identified repository
   $installmsg = "Installing from$Temporary MiKTeX repository for "
   if ($pp['ThisUser']) { 
      $admin = ''
      $Shared = 'no' 
      $installmsg += 'just this user.'
   } else { 
      $admin = '--admin'
      $shared = 'yes'
      $installmsg += 'all users.'
   Write-Host $installmsg
   $InstallArgs = @{
      Statements       = "--verbose $RepoSwitch --package-set=$set --shared=$Shared install "
      ExetoRun         = $MiKTeXsetup
      WorkingDirectory = $toolsDir
      validExitCodes   = @(0)
   $exitCode = Start-ChocolateyProcessAsAdmin @InstallArgs

# Once installed/updated, confirm it's the correct milestone.
[array]$key = Get-UninstallRegistryKey -SoftwareName 'miktex*'
$InstallDir = (Split-Path $key.UninstallString).trim('"')
$InitEXMF = Join-Path $InstallDir 'initexmf.exe'
Write-Verbose "Using 'initexmf.exe' to identify installed milestone."

$ErrorActionPreference = 'SilentlyContinue'
$MileStoneLine = & "$InitEXMF" $admin --report 2>&1 | Where-Object {$_ -match '^CurrentVersion:'}
$ErrorActionPreference = 'Stop'

$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) {
   if ($key.PSPath -match 'HKEY_CURRENT_USER') { $shared = 'no' } else { $shared = 'yes' }
   Write-Verbose "Found an install of MiKTeX."
   # Use MiKTeX's built-in updater
   $InstallDir = (Split-Path $key.UninstallString).trim('"')
   $MiKTeXsetup = Join-Path $InstallDir 'miktexsetup.exe'
   Write-Verbose 'Uninstalling MiKTeX using integrated setup utility.'
   $InstallArgs = @{
      Statements       = "--verbose --shared=$shared 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: A3CCB9E3E8C9745DD2478AA0BD18A588 | sha1: C6CC441775023C10D18A5AFF7C3C6C4FF30E430F | sha256: E866F27AA24EA0CA27EECC631ABAE3E750E42A94A49A01814D686B0BD2E14877 | sha512: 10D40898BFDA6C7C224CD20D8C67E0E21D52EB517B5FDFB0C1E8C57F8BAEA1B3F512365723AA97CE8CC700F9463498E01B8EFF58FF89F45ED641D89AF7E2F80B
md5: B45F584A1A40AC4B35D390C7AF2C97EF | sha1: 1EFC1F7230B2BA35451DB46B62E2B82877937303 | sha256: 9FB30F32211B2369CD4D4AC1DF5F5169777B1758AA9204906E64BB1511A198B8 | sha512: A1A5D95676F09EA75B2D4B68A1C405F424D0DB54132F76EF91A2829EBB93E857C78981C2BCBAF401EACDD2760D5DF14BA0D199D2136E1F5A25CBF0B6CBC2DBB9
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       = '22.3'
32-bit URL      = ''
32-bit checksum = '9FB30F32211B2369CD4D4AC1DF5F5169777B1758AA9204906E64BB1511A198B8'
64-bit URL      = ''
64-bit checksum = 'E866F27AA24EA0CA27EECC631ABAE3E750E42A94A49A01814D686B0BD2E14877'

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.

Add to Builder Version Downloads Last Updated Status
MiKTeX (Install) 22.1 8732 Wednesday, February 2, 2022 Approved
MiKTeX (Install) 21.12 6363 Wednesday, December 29, 2021 Approved
MiKTeX (Install) 21.10 8875 Saturday, November 6, 2021 Approved
MiKTeX (Install) 21.8 8544 Thursday, September 16, 2021 Approved
MiKTeX (Install) 21.6.28 12194 Tuesday, July 13, 2021 Approved
MiKTeX (Install) 21.3 13465 Saturday, April 3, 2021 Approved
MiKTeX (Install) 21.2 7238 Wednesday, February 24, 2021 Approved
MiKTeX (Install) 21.1 7344 Wednesday, January 20, 2021 Approved
MiKTeX (Install) 796 Monday, January 11, 2021 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