miktexsetup

## Name

miktexsetup — MiKTeX setup utility

## Synopsis

`miktexsetup_standalone` [``options``] download

`miktexsetup_standalone` [``options``] install

`miktexsetup` [``options``] uninstall

## Description

The MiKTeX Setup Utility is used to download, set up and remove MiKTeX. This utility is the command line counterpart of the MiKTeX Setup Wizard. It is suitable for unattended setup tasks.

The utility comes in two variants:

standalone (miktexsetup_standalone)

  The standalone variant can be downloaded from the MiKTeX download page. It is only available for Windows.

integrated (miktexsetup)

  The integrated variant is a component of each MiKTeX installation.

The `download` task creates a local package package repository which is a mirror of the remote package repository. It is possible to run the task on a regular basis in order to maintain an up-to-date package repository.

The `install` task installs MiKTeX from a local package repository. This task is only available in the standalone variant.

The `uninstall` task removes MiKTeX. This task is only available in the integrated variant and only on Windows.

## Options

`--common-config=`dir``

  Set the location of the common configuration directory. This option requires administrator privileges.

`--common-data=`dir``

  Set the location of the common data directory. This option requires administrator privileges.

`--common-install=`dir``

  Set the common installation directory. This option requires administrator privileges.

`--common-link-target-directory=`dir``

  Set the system-wide directory in which to create symbolic links to MiKTeX executables.

`--common-roots=`dirs``

  Register additional directories for all users. `dirs` must be a semicolon-separated list of fully qualified path names. This option requires administrator privileges.

  Environment variables (<VARNAME>) can be used.

`--list-repositories`

  Download the list of known package repository URLs, then print the list.

`--local-package-repository=`dir``

  Download into (install from) the specified directory.

`--modify-path`

  Add MiKTeX to `PATH`.

`--modify-path=no`

  Don't add MiKTeX to `PATH`.

`--modify-path`

  Add MiKTeX to `PATH`.

`--package-set=`set``

  Download/Install the specified package set. This must be one of `essential`, `basic`, `complete`.

`--portable=`dir``

  Setup MiKTeX for use on a portable device.

`--print-info-only`

  Print information about what would be done then exit.

`--program-folder=`name``

  Add shortcuts to the specified program folder.

`--quiet`

  Suppress all output, except errors.

`--remote-package-repository=`url``

  Download from the specified URL. Use `--list-repositories` to download an up-to-date list of possible repositories.

`--shared=yes`

  Run the task for all users. This option requires administrator privileges.

`--shared=no`

  Run the task for current user only.

`--trace[=`tracestreams`]`

  Enable trace messages. The `tracestreams` argument, if specified, is a comma-separated list of trace stream names (Chapter 9, Trace Streams).

`--use-registry=yes`

  Write configuration settings into the Windows registry.

`--use-registry=no`

  Don't write configuration settings into the Windows registry. Use configuration files instead.

`--user-config=`dir``

  Set the location of the configuration directory for the current user.

  Environment variables (<VARNAME>) can be used. See the example below.

`--user-data=`dir``

  Set the location of the data directory for the current user.

  Environment variables (<VARNAME>) can be used. See the example below.

`--user-install=`dir``

  Set the user installation directory.

  Environment variables (<VARNAME>) can be used. See the example below.

`--user-link-target-directory=`dir``

  Set the per-user directory in which to create symbolic links to MiKTeX executables.

`--user-roots=`dirs``

  Register additional directories for the current user. `dirs` must be a semicolon-separated list of fully qualified path names.

  Environment variables (<VARNAME>) can be used.

`--verbose`

  Turn on verbose output mode.

`--version`

  Show version information and exit.

## Examples

### Downloading

The first task is to download MiKTeX into a local package repository:

    > miktexsetup_standalone ^
      --verbose ^
      --local-package-repository=C:\miktex-repository ^
      --package-set=complete ^
      download

This command will create a local package repository in `C:\miktex-repository`.

It is possible to interrupt (Control+C) this operation at anytime and resume it later by running the same command again.

### Installing for all users

In this example, MiKTeX is installed for all users from the local package repository `C:\miktex-repository`. User directories are specified by using environment variables (<VARNAME>) which are expanded at run-time (delayed expansion).

You can first specify `--print-info-only` in order to perform a dry run:

    > miktexsetup_standalone ^
      --verbose ^
      --local-package-repository=C:\miktex-repository ^
      --shared=yes ^
      --user-config="<APPDATA>\MiKTeX" ^
      --user-data="<LOCALAPPDATA>\MiKTeX" ^
      --user-install=<APPDATA>\MiKTeX" ^
      --print-info-only
      install
    setup task: install from local package repository
    local package repository: C:\miktex-repository
    package level: complete
    install for all users?: yes
    use registry?: yes
    modify path?: yes
    common install root: "C:\Program Files (x86)\MiKTeX"
    user install root: <APPDATA>\MiKTeX
    user config root: <LOCALAPPDATA>\MiKTeX
    user data root: <APPDATA>\MiKTeX
    program folder name: "MiKTeX"

### Uninstalling

MiKTeX can be removed by selecting the `uninstall` task (only available in the integrated variant on Windows). `--shared=yes` should be specified, if MiKTeX is installed for all users.

    > miktexsetup --verbose --shared=yes uninstall