Name

miktexsetup — MiKTeX setup utility

Synopsis

miktexsetup [options] download

miktexsetup [options] install

miktexsetup [options] uninstall

Description

The MiKTeX Setup Utility is used to download, install and uninstall MiKTeX. This utility is the command line counterpart of the MiKTeX Setup Wizard (see setupwiz(1)), i.e., it is suitable for unattended setup tasks.

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 the local package repository.

The uninstall task removes MiKTeX.

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-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

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 speciefied, is a comma-separated list of trace stream names (Chapter 9, Trace Streams).

--use-registry

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-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:

C:\> miktexsetup ^
  --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:

C:\> miktexsetup ^
  --verbose ^
  --local-package-repository=C:\miktex-repository ^
  --shared ^
  --user-config="<APPDATA>\MiKTeX\2.9" ^
  --user-data="<LOCALAPPDATA>\MiKTeX\2.9" ^
  --user-install=<APPDATA>\MiKTeX\2.9" ^
  --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 2.9"
user install root: <APPDATA>\MiKTeX\2.9
user config root: <LOCALAPPDATA>\MiKTeX\2.9
user data root: <APPDATA>\MiKTeX\2.9
program folder name: "MiKTeX 2.9"

Uninstalling

MiKTeX can be removed by selecting the uninstall task. --shared should be specified, if MiKTeX is installed for all users.

C:\> miktexsetup --verbose --shared uninstall