miktexsetup — MiKTeX setup utility
miktexsetup_standalone [] download options
miktexsetup_standalone [] install options
miktexsetup [] uninstall options
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:
The standalone variant can be downloaded from the MiKTeX download page. It is only available for Windows.
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.
--common-config=dirSet the location of the common configuration directory. This option requires administrator privileges.
--common-data=dirSet the location of the common data directory. This option requires administrator privileges.
--common-install=dirSet the common installation directory. This option requires administrator privileges.
--common-link-target-directory=dirSet the system-wide directory in which to create symbolic links to MiKTeX executables.
--common-roots=dirsRegister 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-repositoriesDownload the list of known package repository URLs, then print the list.
--local-package-repository=dirDownload into (install from) the specified directory.
--modify-pathAdd MiKTeX to PATH.
--modify-path=noDon't add MiKTeX to PATH.
--modify-pathAdd MiKTeX to PATH.
--package-set=setDownload/Install the specified package set.
This must be one of
essential,
basic,
complete.
--portable=dir--print-info-onlyPrint information about what would be done then exit.
--program-folder=nameAdd shortcuts to the specified program folder.
--quietSuppress all output, except errors.
--remote-package-repository=urlDownload from the specified URL. Use
--list-repositories to download an up-to-date list of
possible repositories.
--shared=yesRun the task for all users. This option requires administrator privileges.
--shared=noRun 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=yesWrite configuration settings into the Windows registry.
--use-registry=noDon't write configuration settings into the Windows registry. Use configuration files instead.
--user-config=dirSet the location of the configuration directory for the current user.
Environment variables (<VARNAME>) can be used. See the example below.
--user-data=dirSet the location of the data directory for the current user.
Environment variables (<VARNAME>) can be used. See the example below.
--user-install=dirSet the user installation directory.
Environment variables (<VARNAME>) can be used. See the example below.
--user-link-target-directory=dirSet the per-user directory in which to create symbolic links to MiKTeX executables.
--user-roots=dirsRegister additional directories for the current user.
dirs must be a semicolon-separated list of
fully qualified path names.
Environment variables (<VARNAME>) can be used.
--verboseTurn on verbose output mode.
--versionShow version information and exit.
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.
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 installsetup 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"