Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Environment variable
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== True environment variables == ==={{anchor|UNIX-ENV}}Unix === {{anchor|$PATH}} {{See also|Path (computing)}} ;<code>$PATH</code>: Contains a colon-separated list of directories that the shell searches for commands that do not contain a slash in their name (commands with slashes are interpreted as file names to execute, and the shell attempts to execute the files directly). It is equivalent to the [[DOS]], [[OS/2]] and [[Microsoft Windows|Windows]] <code>[[#%PATH%|%PATH%]]</code> variable. ;{{anchor|$HOME}}<code>$HOME</code>: Contains the location of the user's [[home directory]]. Although the current user's home directory can also be found out through the C-functions <code>getpwuid</code> and <code>getuid</code>, <code>$HOME</code> is often used for convenience in various shell scripts (and other contexts). Using the environment variable also gives the user the possibility to point to another directory. ;{{anchor|$PWD}}<code>$PWD</code>: This variable points to the current directory. Equivalent to the output of the command pwd when called without arguments. ;{{anchor|$DISPLAY}}<code>$DISPLAY</code>: Contains the identifier for the display that [[X11]] programs should use by default. ;{{anchor|$LD_LIBRARY_PATH}}<code>$LD_LIBRARY_PATH</code>: On many Unix systems with a [[dynamic linker]], contains a colon-separated list of directories that the dynamic linker should search for [[shared object]]s when building a process image after <code>exec</code>, before searching in any other directories. ;{{anchor|$LIBPATH}}<code>$LIBPATH</code> or <code>$SHLIB_PATH</code>: Alternatives to <code>$LD_LIBRARY_PATH</code> typically used on older Unix versions. ;{{anchor|$LANG|$LC_ALL|$LC_CTYPE|$LC_COLLATE|$LC_DATE}}<code>$LANG, $LC_ALL, $LC_...</code>: <code>$LANG</code> is used to set to the default [[Locale (computer software)|locale]]. For example, if the locale values are <code>pt_BR</code>, then the language is set to (Brazilian) Portuguese and Brazilian practice is used where relevant. Different aspects of localization are controlled by individual <code>$LC_</code>-variables (<code>$LC_CTYPE</code>, <code>$LC_[[collation|COLLATE]]</code>, <code>$LC_DATE</code> etc.). <code>$LC_ALL</code> can be used to force the same locale for all aspects. ;{{anchor|$TZ}}<code>$TZ</code>: Refers to [[time zone]]. It can be in several formats, either specifying the time zone itself or referencing a file (in <code>/usr/share/zoneinfo</code>). ;{{anchor|$BROWSER}}<code>$BROWSER</code>: Contains a colon-separated list of a user's [[web browser]] preferences, for use by programs that need to allow the user to view content at a [[URL]]. The browsers in the list are intended to be attempted from first to last, stopping after the first one that succeeds. This arrangement allows for fallback behavior in different environments, e.g., in an [[X Window System|X11]] environment, a graphical browser (such as [[Firefox]]) can be used, but in a console environment a terminal-base browser (such a [[Lynx (web browser)|Lynx]]) can be used. A <code>%s</code> token may be present to specify where the URL should be placed; otherwise the browser should be launched with the URL as the first argument.<ref name="ESR_2002_BROWSER"/><ref name="LWN_2001_BROWSER"/><ref name="PERL_ENV_BROWSER"/><ref name="PYTHON_WEBBROWSER"/><ref name="DEBIAN_DFLT_WEB_BROWSER"/> ==={{anchor|DOS-ENV}}DOS === {{anchor|Pre-environment|System environment|Master environment|Local environment|Pre-environment variable|System environment variable|Master environment variable|Local environment variable}} Under DOS, the ''master environment'' is provided by the primary command processor, which inherits the ''pre-environment'' defined in <code>CONFIG.SYS</code> when first loaded. Its size can be configured through the <code>COMMAND /E:n</code> parameter between 160<ref name="4DOS_8.00_HELP"/><!-- DR-DOS COMMAND: 128, MDOS: 120 --> and 32767<ref name="4DOS_8.00_HELP"/><!-- DR-DOS COMMAND: 32751 --> bytes. ''Local environment'' segments inherited to child processes are typically reduced down to the size of the contents they hold. Some command-line processors (like [[4DOS]]) allow to define a minimum amount of free environment space that will be available when launching secondary shells.<ref name="4DOS_8.00_HELP"/> While the content of environment variables remains unchanged upon storage, their names (without the "<code>%</code>") are always converted to uppercase, with the exception of ''pre-environment variables'' defined via the <code>[[CONFIG.SYS]]</code> directive <code>[[SET (CONFIG.SYS directive)|SET]]</code> under [[DR DOS 6.0]] and higher<ref name="Paul_1997_NWDOSTIP"/><ref name="Paul_1997_4DOSTIP"/> (and only with <code>[[SWITCHES (CONFIG.SYS directive)|SWITCHES=/L]]</code> (for "allow lowercase names") under [[DR-DOS 7.02]] and higher).<ref name="4DOS_8.00_HELP"/><ref name="Paul_1997_OD-A3"/> In principle, [[MS-DOS 7.0]] and higher also supports lowercase variable names (<code>[[#windir|%windir%]]</code>), but provides no means for the user to define them.<!-- but WIN.COM can set %windir% --> Environment variable names containing lowercase letters are stored in the environment just like normal environment variables, but remain invisible to most DOS software, since they are written to expect uppercase variables only.<ref name="4DOS_8.00_HELP"/><ref name="Paul_1997_NWDOSTIP"/><ref name="Paul_1997_4DOSTIP"/> Some command processors<!-- such as 4DOS --> limit the maximum length of a variable name to 80 characters.<ref name="4DOS_8.00_HELP"/> While principally only limited by the size of the ''environment segment'', some DOS and 16-bit Windows programs<ref name="4DOS_8.00_HELP"/><ref group="nb" name="NB_ENVLEN128"/> do not expect the contents of environment variables to exceed 128 characters. DR-DOS <code>COMMAND.COM</code> supports environment variables up to 255<!-- not 256 -->, [[4DOS]] even up to 512 characters.<ref name="4DOS_8.00_HELP"/> Since <code>COMMAND.COM</code> can be configured (via <code>/L:128..1024</code>) to support command lines up to 1024 characters internally under MS-DOS 7.0 and higher, environment variables should be expected to contain at least 1024 characters as well. In some versions of DR-DOS, the environment passed to drivers, which often do not need their environment after installation, can be shrunken or [[relocation (computing)|relocated]] through <code>SETENV</code> or <code>[[INSTALL (CONFIG.SYS directive)|INSTALL[HIGH]]]</code>/<code>[[LOADHIGH]]</code> options <code>/Z</code> (zero environment), <code>/D[:[[load drive|loaddrive]]]</code> (substitute drive, e.g. <code>B:TSR.COM</code>) and <code>/E</code> (relocate environment above program) in order to minimize the driver's effectively resulting resident [[memory footprint]].<ref name="Paul_1997_SETENV"/><ref name="Paul_1997_OD-A3"/><ref name="Paul_1997_NWDOSTIP"/><ref name="Paul_2002_CTMOUSE"/><ref name="PTS-DOS_2000"/><ref name="Paul_2002_COM"/> In batch mode, non-existent environment variables are replaced by a zero-length string. {{anchor|Reserved environment variable}}''Standard environment variables''<!-- DR-DOS term --> or ''reserved environment variables'' include: ;{{anchor|%APPEND%}}<code>%APPEND%</code> (supported since DOS 3.3): This variable contains a semicolon-delimited list of directories in which to search for files. It is usually changed via the <code>[[APPEND (DOS command)|APPEND]] /E</code> command, which also ensures that the directory names are converted into uppercase. Some DOS software actually expects the names to be stored in uppercase and the length of the list not to exceed 121<ref name="4DOS_8.00_HELP"/> characters, therefore the variable is best not modified via the <code>[[SET (DOS command)|SET]]</code> command. [[Long filename]]s containing spaces or other special characters must not be quoted (<code>"</code>). ;{{anchor|%CONFIG%}}<code>%CONFIG%</code> (supported since [[MS-DOS 6.0]] and [[PC DOS 6.1]], also supported by [[Datalight ROM-DOS|ROM-DOS]]<ref name="Datalight_2005_ROM-DOS"/>): This variable holds the symbolic name of the currently chosen boot configuration. It is set by the [[DOS BIOS]] (<code>[[IO.SYS]]</code>, <code>[[IBMBIO.COM]]</code>, etc.) to the name defined by the corresponding <code>[[CONFIG.SYS]]</code> directive <code>[[MENUITEM (CONFIG.SYS directive)|MENUITEM]]</code> before launching the primary command processor. Its main purpose is to allow further special cases in <code>[[AUTOEXEC.BAT]]</code> and similar batchjobs depending on the selected option at boot time. This can be emulated under DR-DOS by utilizing the <code>CONFIG.SYS</code> directive <code>[[SET (CONFIG.SYS directive)|SET]]</code> like <code>SET CONFIG=1</code>. ;{{anchor|%CMDLINE%}}<code>%CMDLINE%</code> (introduced with [[4DOS]], also supported since [[MS-DOS 7.0]]): This variable contains the fully expanded text of the currently executing command line. It can be read by applications to detect the usage of and retrieve long command lines, since the traditional method to retrieve the command line arguments through the [[Program Segment Prefix|PSP]] (or related [[Application programming interface|API]] functions) is limited to 126 characters and is no longer available when [[File Control Block|FCB]]s get expanded or the default [[Disk Transfer Area|DTA]] is used. While 4DOS supports longer command lines, <code>COMMAND.COM</code> still only supports a maximum of 126 characters at the prompt by default (unless overridden with <code>/U:128..255</code> to specify the size of the command line buffer), but nevertheless internal command lines can become longer through f.e. variable expansion (depending on <code>/L:128..1024</code> to specify the size of the internal buffer). In addition to the command-line length byte in the PSP, the PSP command line is normally limited by [[ASCII 13|ASCII-13]], and command lines longer than 126 characters will typically be truncated by having an ASCII-13 inserted at position 127,<ref name="Paul_1997_4DOSTIP"/> but this cannot be relied upon in all scenarios.<ref name="Paul_1997_4DOSTIP"/><ref group="nb" name="NB_CMDLINE"/> The variable will be suppressed for external commands invoked with a preceding <code>@</code>-symbol like in <code>@XCOPY ...</code> for backward compatibility and in order to minimize the size of the environment when loading non-relocating [[terminate-and-stay-resident program]]s. Some beta versions of [[Windows Chicago]] used <code>%CMDLINE%</code> to store only the remainder of the command line excessing 126 characters instead of the complete command line.<ref name="Paul_1997_NWDOSTIP"/><ref name="Paul_1997_4DOSTIP"/> ;{{anchor|%COMSPEC%}}<code>[[COMSPEC|%COMSPEC%]]</code> (supported since DOS 2.0): This variable contains the full [[8.3 filename|8.3]] path to the [[command processor]], typically <code>C:\[[COMMAND.COM]]</code> or <code>C:\DOS\COMMAND.COM</code>. It must not contain [[long filenames]], but under DR-DOS it may contain [[FAT file password|file]] and [[FAT directory password|directory password]]s. It is set up by the primary command processor to point to itself (typically reflecting the settings of the <code>[[CONFIG.SYS]]</code> directive <code>[[SHELL (CONFIG.SYS directive)|SHELL]]</code>), so that the resident portion of the command processor can reload its transient portion from disk after the execution of larger programs. The value can be changed at runtime to reflect changes in the configuration, which would require the command processor to reload itself from other locations. The variable is also used when launching secondary shells. ;{{anchor|%COPYCMD%}}<code>%COPYCMD%</code> (supported since [[MS-DOS 6.2]] and [[PC DOS 6.3]], also supported by [[Datalight ROM-DOS|ROM-DOS]]<ref name="Datalight_2005_ROM-DOS"/>): Allows a user to specify the <code>/Y</code> switch (to assume "Yes" on queries) as the default for the <code>[[copy (command)|COPY]]</code>, <code>[[XCOPY]]</code>, and <code>[[move (command)|MOVE]]</code> commands. A default of <code>/Y</code> can be overridden by supplying the <code>/-Y</code> switch on the command line. The <code>/Y</code> switch instructs the command to replace existing files without prompting for confirmation. ;{{anchor|%DIRCMD%}}<code>%DIRCMD%</code> (supported since [[MS-DOS 5.0]] and [[IBM DOS 5.0|PC DOS 5.0]], also supported by [[Datalight ROM-DOS|ROM-DOS]]<ref name="Datalight_2005_ROM-DOS"/>): Allows a user to specify customized default parameters for the <code>[[dir (command)|DIR]]</code> command, including file specifications. Preset default switches can be overridden by providing the negative switch on the command line. For example, if <code>%DIRCMD%</code> contains the <code>/W</code> switch, then it can be overridden by using <code>DIR /-W</code> at the command line. This is similar to the environment variable <code>[[#%$DIR%|%$DIR%]]</code> under [[DOS Plus]]<ref name="Kotulla_1987_Environment"/> and a facility to define default switches for <code>DIR</code> through its <code>/C</code> or <code>/R</code> switches under [[DR-DOS]] <code>COMMAND.COM</code>.<ref name="Paul_1997_NWDOSTIP"/> <code>%DIRCMD%</code> is also supported by the external <code>SDIR.COM</code>/<code>DIR.COM</code> [[Stacker (disk compression)|Stacker]] commands under [[Novell DOS 7]] and higher.<ref name="Paul_1997_NWDOSTIP"/> ;{{anchor|%LANG%}}<code>%LANG%</code> (supported since [[MS-DOS 7.0]]): This variable is supported by some tools to switch the locale for messages in multilingual issues. ;{{anchor|%LANGSPEC%}}<code>%LANGSPEC%</code> (supported since [[MS-DOS 7.0]]): This variable is supported by some tools to switch the locale for messages in multilingual issues. ;{{anchor|%NO_SEP%}}<code>%NO_SEP%</code> (supported since [[PC DOS 6.3]] and [[DR-DOS 7.07]]): This variable controls the display of [[Decimal separator#Digit grouping|thousands-separator]]s in messages of various commands. Issued by default, they can be suppressed by specifying <code>SET NO_SEP=ON</code> or <code>SET NO_SEP=1</code> under PC DOS. DR-DOS additionally allows to override the system's thousands-separator displayed as in f.e. <code>SET NO_SEP=.</code>.<ref name="4DOS_8.00_HELP"/> ;{{anchor|%PATH%}}<code>[[PATH (environment variable)|%PATH%]]</code> (supported since DOS 2.0): This variable contains a semicolon-delimited list of directories in which the [[command interpreter]] will search for [[executable file]]s. Equivalent to the Unix <code>[[#$PATH|$PATH]]</code> variable (but some DOS and Windows applications also use the list to search for data files similar to <code>[[#$LD_LIBRARY_PATH|$LD_LIBRARY_PATH]]</code> on Unix-like systems). It is usually changed via the <code>[[PATH (DOS command)|PATH]]</code> (or <code>PATH /E</code> under [[MS-DOS 6.0]]) command, which also ensures that the directory names are converted into uppercase. Some DOS software actually expects the names to be stored in uppercase and the length of the list not to exceed 123<ref name="4DOS_8.00_HELP"/> characters,<ref group="nb" name="NB_ENVLEN128"/> therefore the variable should better not be modified via the <code>[[SET (DOS command)|SET]]</code> command.<ref name="4DOS_8.00_HELP"/> [[Long filename]]s containing spaces or other special characters must not be quoted (<code>"</code>). By default, the current directory is searched first, but some command-line processors like [[4DOS]] allow "<code>.</code>" (for "current directory") to be included in the list as well in order to override this search order; some DOS programs are incompatible with this extension.<ref name="4DOS_8.00_HELP"/> ;{{anchor|%PROMPT%}}<code>%PROMPT%</code> (supported since DOS 2.0): This variable contains a <code>$</code>-tokenized string defining the display of the [[prompt (computing)|prompt]]. It is usually changed via the <code>[[PROMPT (DOS command)|PROMPT]]</code> command. ;{{anchor|%TEMP%|%TMP%}}<code>%TEMP%</code> (and <code>%TMP%</code>): These variables contain the path to the directory where [[temporary file]]s should be stored. Operating system tools typically only use <code>%TEMP%</code>, whereas third-party programs also use <code>%TMP%</code>. Typically <code>%TEMP%</code> takes precedence over <code>%TMP%</code>. The [[DR-DOS]] family supports a number of additional ''standard environment variables''<!-- DR-DOS term --> including: ;{{anchor|%BETA%}}<code>%BETA%</code>: This variable contains an optional message displayed by some versions (including [[DR DOS 3.41]]<!-- not supported by DR DOS 3.31-3.40 -->) of <code>COMMAND.COM</code> at the startup of secondary shells.<ref name="Paul_2002_CLS"/> ;{{anchor|%DRDOSCFG%|%NWDOSCFG%|%OPENDOSCFG%}}<code>%DRDOSCFG%</code>/<code>%NWDOSCFG%</code>/<code>%OPENDOSCFG%</code>: This variable contains the directory<ref name="Caldera_1998_USER"/> (without trailing "<code>\</code>") where to search for <code>.INI</code> and <code>.CFG</code> configuration files (that is, DR-DOS application specific files like <code>TASKMGR.INI</code>, <code>TASKMAX.INI</code>, <code>[[VIEWMAX.INI]]</code>, <code>FASTBACK.CFG</code> etc., class specific files like <code>COLORS.INI</code>, or global files like <code>[[DRDOS.INI]]</code>, <code>[[NWDOS.INI]]</code>, <code>[[OPENDOS.INI]]</code>, or <code>[[DOS.INI]]</code>), as used by the <code>INSTALL</code> and <code>SETUP</code> commands and various DR-DOS programs like <code>DISKOPT</code>, <code>DOSBOOK</code>, <code>EDIT</code>, <code>FBX</code>, <code>FILELINK</code>, <code>LOCK</code>, <code>SECURITY.OVL</code>/<code>NWLOGIN.EXE</code>, <code>SERNO</code>, <code>TASKMAX</code>, <code>TASKMGR</code>, <code>[[VIEWMAX]]</code>, or <code>UNDELETE</code>.<ref name="Paul_1997_NWDOSTIP"/> It must not contain [[long filename]]s. ;{{anchor|%DRCOMSPEC%}}<code>%DRCOMSPEC%</code>: This variable optionally holds an alternative path to the command processor taking precedence over the path defined in the <code>%COMSPEC%</code> variable, optionally including [[FAT file password|file]] and [[FAT directory password|directory password]]s. Alternatively, it can hold a special value of "<code>ON</code>" or "<code>1</code>" in order to enforce the usage of the <code>%COMSPEC%</code> variable even in scenarios where the <code>%COMSPEC%</code> variable may point to the wrong command-line processor, for example, when running some versions of the DR-DOS <code>[[SYS (command)|SYS]]</code> command under a foreign operating system.<ref name="Paul_2017"/> ;{{anchor|%DRSYS%}}<code>%DRSYS%</code>: Setting this variable to "<code>ON</code>" or "<code>1</code>" will force some versions of the DR-DOS <code>[[SYS (command)|SYS]]</code> command to work under foreign operating systems instead of displaying a warning.<ref name="Paul_2017"/> ;{{anchor|%FBP_USER%|FBP_USER}}<code>%FBP_USER%</code>: Specifies the user name used by the [[FastBack]] command <code>[[FBX (DOS command)|FBX]]</code> and <code>{user}[[.FB]]</code> configuration files under [[Novell DOS 7]].<ref name="Paul_1997_NWDOSTIP"/> ;{{anchor|%HOMEDIR%}}<code>%HOMEDIR%</code>: This variable may contain the home directory under DR-DOS (including [[DR DOS 5.0]] and [[DR DOS 6.0|6.0]]).<ref name="Paul_1997_NWDOSTIP"/><ref name="Paul_2002_CLS"/> ;{{anchor|%INFO%}}<code>%INFO%</code>: In some versions of DR-DOS <code>COMMAND.COM</code> this variable defines the string displayed by the <code>$I</code> token of the <code>[[PROMPT (DOS command)|PROMPT]]</code> command.<ref name="Paul_2002_CLS"/> It can be used, for example, to inform the user how to exit secondary shells. ;{{anchor|%LOGINNAME%}}<code>%LOGINNAME%</code>: In some versions of DR-DOS <code>COMMAND.COM</code> this variable defines the user name displayed by the <code>$U</code> token of the <code>[[PROMPT (DOS command)|PROMPT]]</code> command, as set up by f.e. login scripts for [[Novell NetWare]].<ref name="4DOS_8.00_HELP"/><ref name="Paul_1997_NWDOSTIP"/><ref name="Paul_2002_CLS"/> See also the similarly named pseudo-variable <code>[[#%LOGIN_NAME%|%LOGIN_NAME%]]</code>. ;{{anchor|%MDOS_EXEC%}}<code>%MDOS_EXEC%</code>: This variable can take the values "<code>ON</code>" or "<code>OFF</code>" under [[Multiuser DOS]].<!-- f.e CCI Multiuser DOS 7.22 GOLD --> If enabled, the operating system permits applications to shell out to secondary shells with the [[DOS Program Area]] (DPA) freed in order to have maximum DOS memory available for secondary applications instead of running them in the same domain as under DOS.<ref name="CCI_1997_HELP"/><ref name="CCI_1997_PRINTDOC"/> ;{{anchor|%NOCHAR%}}<code>%NOCHAR%</code>: This variable can be used to define the character displayed by some commands in messages for "No" in <code>[Y,N]</code> queries, thereby overriding the current system default (typically "<code>N</code>" in English versions of DR-DOS). If it contains a string, only the first character, uppercased, will be taken. Some commands also support a command line parameter <code>/Y</code> to automatically assume "Yes" on queries, thereby suppressing such prompts. If, however, the parameter <code>/Y:yn</code> is used to specify the "Yes"/"No" characters (thereby overriding any <code>%NOCHAR%</code> setting), queries are not suppressed. See also the related <code>CONFIG.SYS</code> directive <code>[[NOCHAR (CONFIG.SYS directive)|NOCHAR]]</code> and the environment variable <code>[[#%YESCHAR%|%YESCHAR%]]</code>.<ref name="Paul_2017"/> ;{{anchor|%NOSOUND%}}<code>%NOSOUND%</code>: Setting this variable to "<code>ON</code>" or "<code>1</code>" will disable default beeps issued by some DR-DOS commands in certain situations such as to inform the user of the completion of some operation, that user interaction is required, or when a wrong key was pressed. Command line options to specifically enable certain beeps will override this setting. ;{{anchor|%OS%}}<code>%OS%</code>:This variable contains the name of the operating system in order to distinguish between different DOS-related operating systems of [[Digital Research]]-origin in batch jobs and applications.<ref name="Caldera_1998_USER"/> Known values include "<code>DOSPLUS</code>" ([[DOS Plus 1.2]] in DOS emulation), "<code>CPCDOS 4.1</code>" (DOS Plus 1.2 in [[CP/M]] emulation), "<code>DRDOS</code>" ([[DR DOS 3.31]]-[[DR DOS 6.0|6.0]], [[DR DOS Panther]], [[DR DOS StarTrek]], [[DR-DOS 7.02]]<ref name="Caldera_1998_USER"/>-[[DR-DOS 7.05|7.05]]), "<code>EZDOS</code>" ([[EZ-DOS 3.41]]), "<code>PALMDOS</code>" and "<code>NetWare PalmDOS</code>" ([[PalmDOS 1.0]]), "<code>NWDOS</code>" ([[Novell DOS 7]]), "<code>NWDOS7</code>" (Novell DOS 7 Beta<!-- BETA 1 (1993-04-26) -->), "<code>OPENDOS</code>" ([[Caldera OpenDOS 7.01]], [[Caldera DR-OpenDOS 7.02]]), "<code>CDOS</code>" ([[Concurrent DOS]], [[Concurrent DOS XM]]), "<code>CPCDOS</code>" ([[Concurrent PC DOS]]), "<code>CDOS386</code>" ([[Concurrent DOS 386]]), "<code>DRMDOS</code>" ([[DR Multiuser DOS]]), "<code>MDOS</code>" ([[CCI Multiuser DOS]]<!-- Gold/Plus/Light -->),<ref name="CCI_1997_HELP"/> "<code>IMSMDOS</code>" ([[IMS Multiuser DOS]]), "<code>REAL32</code>" ([[REAL/32]]).<ref name="Paul_1997_NWDOSTIP"/><ref name="Paul_2002_OS"/> MS-DOS <code>[[INTERSVR (DOS command)|INTERSVR]]</code> looks for a value of "<code>DRDOS</code>" as well.<ref name="Paul_2002_OS"/> See also the identically named environment variable <code>[[#OS|%OS%]]</code> later introduced in the [[Windows NT family]]. ;{{anchor|%PEXEC%}}<code>%PEXEC%</code>: In some versions of DR-DOS this variable defines the command executed by the <code>$X</code> token of the <code>[[PROMPT (DOS command)|PROMPT]]</code> command before <code>COMMAND.COM</code> displays the prompt after returning from external program execution.<ref name="Paul_1997_NWDOSTIP"/><ref name="Caldera_1998_USER"/> ;{{anchor|%SWITCHAR%}}<code>%SWITCHAR%</code>: This variable defines the [[SwitChar]] to be used for argument parsing by some DR-DOS commands. If defined, it overrides the system's current SwitChar setting. The only accepted characters are "<code>/</code>" (DOS style), "<code>-</code>" (Unix style) and "<code>[</code>" (CP/M style). See also the related <code>CONFIG.SYS</code> directive <code>[[SWITCHAR (CONFIG.SYS directive)|SWITCHAR]]</code> (to set the system's SwitChar setting) and the <code>[[#%/%|%/%]]</code> ''system information variable'' in some issues of DR-DOS <code>COMMAND.COM</code> (to retrieve the current setting for portable batchjobs). ;{{anchor|%TASKMGRWINDIR%}}<code>%TASKMGRWINDIR%</code>: This variable specifies the directory, where the [[Windows]] <code>[[SYSTEM.INI]]</code> to be used by the DR-DOS <code>TASKMGR</code> multitasker is located, overriding the default procedure to locate the file.<ref name="Paul_1997_NWDOSTIP"/> ;{{anchor|%VER%}}<code>%VER%</code>: This variable contains the version of the operating system in order to distinguish between different versions of DR-DOS in batch jobs and in the display of the <code>[[ver (command)|VER]]</code> command.<ref name="Caldera_1998_USER"/> It is also used for the <code>$V</code> token of the <code>[[PROMPT (DOS command)|PROMPT]]</code> command and affects the value returned by the ''system information variable'' <code>[[#%OS_VERSION%|%OS_VERSION%]]</code>. Known values include "<code>1.0</code>" ([[PalmDOS 1.0]]), "<code>1.2</code>" ([[DOS Plus 1.2]] in DOS emulation), "<code>2.0</code>" ([[Concurrent DOS 386 2.0]]), "<code>3.0</code>" ([[Concurrent DOS 386 3.0]]), "<code>3.31</code>" ([[DR DOS 3.31]]), "<code>3.32</code>" ([[DR DOS 3.32]]), "<code>3.33</code>" ([[DR DOS 3.33]]), "<code>3.34</code>" ([[DR DOS 3.34]]), "<code>3.35</code>" ([[DR DOS 3.35]]), "<code>3.40</code>" ([[DR DOS 3.40]]), "<code>3.41</code>" ([[DR DOS 3.41]], [[EZ-DOS 3.41]]), "<code>3.41T</code>" ([[DR DOS 3.41T]]), "<code>4.1</code>" ([[Concurrent PC DOS 4.1]]), "<code>5.0</code>" ([[DR DOS 5.0]], [[DR Multiuser DOS 5.0]]), "<code>5.1</code>" ([[Novell DR Multiuser DOS 5.1]]), "<code>6.0</code>" ([[DR Concurrent DOS XM 6.0]], [[DR DOS 6.0]]), "<code>6.2</code>" ([[DR Concurrent DOS XM 6.2]]), "<code>7</code>" ([[Novell DOS 7]], [[Caldera OpenDOS 7.01]], [[DR-DOS 7.02]]-[[DR-DOS 7.05|7.05]]), "<code>7.00</code>" ([[CCI Multiuser DOS 7.00]]), "<code>7.07</code>" ([[DR-DOS 7.07]]), "<code>7.1</code>" ([[IMS Multiuser DOS 7.1]]), "<code>7.21</code>" ([[CCI Multiuser DOS 7.21]]),<ref name="CCI_1997_HELP"/> "<code>7.22</code>" ([[CCI Multiuser DOS 7.22]]) etc.<ref name="Paul_1997_NWDOSTIP"/><ref name="Paul_2002_OS"/><ref name="CCI_1997_HELP"/> ;{{anchor|%YESCHAR%}}<code>%YESCHAR%</code>:This variable can be used to define the character displayed by some commands in messages for "Yes" in <code>[Y,N]</code> queries, thereby overriding the current system default (typically "<code>Y</code>" in English versions of DR-DOS). If it contains a string, only the first character, uppercased, will be taken. Some commands also support a command line parameter <code>/Y</code> to automatically assume "Yes" on queries, thereby suppressing such prompts. If, however, the parameter <code>/Y:y</code> is used to specify the "Yes" character (thereby overriding any <code>%YESCHAR%</code> setting), queries are not suppressed. See also the related <code>CONFIG.SYS</code> directive <code>[[YESCHAR (CONFIG.SYS directive)|YESCHAR]]</code> and the environment variable <code>[[#%NOCHAR%|%NOCHAR%]]</code>.<ref name="Paul_2017"/> ;{{anchor|%$CLS%}}<code>%$CLS%</code>: This variable defines the control sequence to be sent to the console driver to clear the screen when the <code>[[CLS (command)|CLS]]</code> command is issued, thereby overriding the internal default ("<code>β[2J</code>" under DR-DOS, "<code>βE</code>" under [[DOS Plus 1.2]] on Amstrad machines<ref name="Kotulla_1987_Environment"/> as well as under [[Concurrent DOS]], [[Multiuser DOS]], and [[REAL/32]] for [[VT52]] terminals, or "<code>β+</code>" under Multiuser DOS for [[ASCII]] terminals).<ref name="CCI_1997_HELP"/> If the variable is not defined and no <code>[[ANSI.SYS]]</code> console driver is detected, the DR-DOS <code>COMMAND.COM</code> will directly clear the screen via <code>INT 10h/AH=00h</code> [[PC BIOS|BIOS]] function, like MS-DOS/PC DOS <code>COMMAND.COM</code> does. A special <code>\nnn</code>-notation for [[octal number]]s is supported to allow the definition of special characters like ESC ([[ASCII 27|ASCII-27]] = "β" = 1Bh = 33o), as f.e. in <code>SET $CLS=\033[2J</code>. To send the backslash ("<code>\</code>") itself, it can be doubled "<code>\\</code>".<ref name="Paul_1997_NWDOSTIP"/><ref name="Paul_2002_CLS"/><ref name="CCI_1997_HELP"/> ;{{anchor|%$DIR%}}<code>%$DIR%</code>: Supported by [[DOS Plus]] accepting the values "L" (long) or "W" (wide) to change the default layout of directory listings with [[dir (command)|DIR]]. Can be overridden using the command line options <code>/L</code> or <code>/W</code>.<ref name="Paul_2002_CLS"/><ref name="Kotulla_1987_Environment"/> See also the similar environment variable <code>[[#%DIRCMD%|%DIRCMD%]]</code> and the <code>DIR</code> options <code>/C</code> and <code>/R</code> of the DR-DOS COMMAND.COM.<ref name="Paul_1997_NWDOSTIP"/> ;{{anchor|%$PAGE%}}<code>%$PAGE%</code>: Supported by [[DOS Plus]] accepting the values "<code>ON</code>" or "<code>OFF</code>" for pagination control. Setting this to "<code>ON</code>" has the same affect as adding <code>/P</code> to commands supporting it (like [[dir (command)|DIR]] or [[TYPE (DOS command)|TYPE]]).<ref name="Paul_2002_CLS"/><ref name="Kotulla_1987_Environment"/> ;{{anchor|%$LENGTH%}}<code>%$LENGTH%</code>: Used by [[DOS Plus]] to define the screen length of the console in lines. This is used to control in a portable way when the screen output should be temporarily halted until a key is pressed in conjunction with the <code>/P</code> option supported by various commands or with automatic pagnination.<ref name="Paul_2002_CLS"/><ref name="Kotulla_1987_Environment"/> See also the related environment variables <code>[[#%$WIDTH%|%$WIDTH%]]</code> and <code>[[#%DIRSIZE%|%DIRSIZE%]]</code> as well as the similar pseudo-variable <code>[[#%_ROWS%|%_ROWS%]]</code>. ;{{anchor|%$WIDTH%}}<code>%$WIDTH%</code>: Used by [[DOS Plus]] to define the screen width of the console in columns. This is used to control in a portable way the formatting of the screen output of commands like <code>[[dir (command)|DIR]] /W</code> or <code>[[TYPE (DOS command)|TYPE]] filename</code>.<ref name="Paul_2002_CLS"/><ref name="Kotulla_1987_Environment"/> See also the related environment variables <code>[[#%$LENGTH%|%$LENGTH%]]</code> and <code>[[#%DIRSIZE%|%DIRSIZE%]]</code> as well as the similar pseudo-variable <code>[[#%_COLUMNS%|%_COLUMNS%]]</code>. ;{{anchor|%$SLICE%}}<code>%$SLICE%</code>: Used by [[DOS Plus]] accepting a numerical value to control the foreground/background time slicing of multitasking programs.<ref name="Paul_2002_CLS"/><ref name="Kotulla_1987_Environment"/> See also the DOS Plus command <code>[[SLICE (DOS command)|SLICE]]</code>. ;{{anchor|%$ON%}}<code>%$ON%</code>: This variable can hold an optional control sequence to switch text highlighting, reversion or colorization on. It is used to emphasize or otherwise control the display of the file names in commands like <code>[[TYPE (DOS command)|TYPE]] wildcard</code>, for example <code>SET $ON=\033[1m</code> with [[ANSI.SYS]] loaded or <code>SET $ON=\016</code> for an IBM or [[ESC/P]] printer. For the special <code>\nnn</code> octal notation supported, see <code>[[#%$CLS%|%$CLS%]]</code>.<ref name="Paul_1997_NWDOSTIP"/><ref name="Kotulla_1987_Environment"/> While the variable is undefined by default under DOS Plus and DR-DOS, the [[Multiuser DOS]] default for an [[ASCII]] terminal equals <code>SET $ON=\033p</code>.<ref name="Paul_2002_CLS"/><ref name="CCI_1997_HELP"/> See also the related environment variable <code>[[#%$OFF%|%$OFF%]]</code>. ;{{anchor|%$OFF%}}<code>%$OFF%</code>: This variable can hold an optional control sequence to switch text highlighting, reversion or colorization off. It is used to return to the normal output after the display of file names in commands like <code>[[TYPE (DOS command)|TYPE]] wildcard</code>, for example <code>SET $OFF=\033[0m</code> with [[ANSI.SYS]] loaded or <code>SET $OFF=\024</code> for an IBM or [[ESC/P]] printer. For the special <code>\nnn</code> octal notation supported, see <code>[[#%$CLS%|%$CLS%]]</code>.<ref name="Paul_1997_NWDOSTIP"/><ref name="Kotulla_1987_Environment"/> While the variable is undefined by default under DOS Plus and DR-DOS, the [[Multiuser DOS]] default for an [[ASCII]] terminal equals <code>SET $OFF=\033q</code>.<ref name="Paul_2002_CLS"/><ref name="CCI_1997_HELP"/> See also the related environment variable <code>[[#%$ON%|%$ON%]]</code>. ;{{anchor|%$HEADER%}}<code>%$HEADER%</code>: This variable can hold an optional control sequence issued before the output of the file contents in commands like <code>[[TYPE (DOS command)|TYPE]]</code> under DR-DOS 7.02 and higher. It can be used for highlighting, pagination or formatting, f.e. when sending the output to a printer, i.e. <code>SET $HEADER=\017</code> for an IBM or [[ESC/P]] printer. For the special <code>\nnn</code> octal notation supported, see <code>[[#%$CLS%|%$CLS%]]</code>.<ref name="Paul_2002_CLS"/> See also the related environment variable <code>[[#%$FOOTER%|%$FOOTER%]]</code>. ;{{anchor|%$FOOTER%}}<code>%$FOOTER%</code>: This variable can hold an optional control sequence issued after the output of the file contents in commands like <code>[[TYPE (DOS command)|TYPE]]</code> under DR-DOS 7.02 and higher. It is used to return to the normal output format, i.e. <code>SET $FOOTER=\022\014</code> in the printer example above. For the special <code>\nnn</code> octal notation supported, see <code>[[#%$CLS%|%$CLS%]]</code>.<ref name="Paul_2002_CLS"/> See also the related environment variable <code>[[#%$HEADER%|%$HEADER%]]</code>. [[Datalight ROM-DOS]] supports a number of additional ''standard environment variables'' as well including: ;{{anchor|%DIRSIZE%}}<code>%DIRSIZE%</code>: This variable is used to define non-standard screen sizes <code>rows[,cols]</code> for <code>[[DIR (DOS command)|DIR]]</code> options <code>/P</code> and <code>/W</code> (similar to <code>[[#%$LENGTH%|%$LENGTH%]]</code> and <code>[[#%$WIDTH%|%$WIDTH%]]</code> under DOS Plus).<ref name="Datalight_2005_ROM-DOS"/> ;{{anchor|%NEWFILE%}}<code>%NEWFILE%</code>: This variable is automatically set to the first parameter given to the CONFIG.SYS directive [[NEWFILE (CONFIG.SYS directive)|NEWFILE]].<ref name="Datalight_2005_ROM-DOS"/> {{anchor|%TZ%|%COMM%|%SOCKETS%|%HTTP_DIR%|%HOSTNAME%|%FTPDIR%}}<code>%TZ%</code>, <code>%COMM%</code>, <code>%SOCKETS%</code>, <code>%HTTP_DIR%</code>, <code>%HOSTNAME%</code> and <code>%FTPDIR%</code> are also used by ROM-DOS.<ref name="Datalight_2005_ROM-DOS"/> ==={{anchor|OS/2-ENV}}OS/2 === ;{{anchor|BEGINLIBPATH}}<code>%BEGINLIBPATH%</code>: Contains a semicolon-separated list of directories which are searched for [[Dynamic-link library|DLL]]s ''before'' the directories given by the <code>[[LIBPATH|%LIBPATH%]]</code> variable (which is set during system startup with the special [[CONFIG.SYS]] directive <code>[[LIBPATH (CONFIG.SYS directive)|LIBPATH]]</code>). It is possible to specify relative directories here, including "<code>.</code>" for the current working directory. See also the related environment variable <code>[[#ENDLIBPATH|%ENDLIBPATH%]]</code>. ;{{anchor|ENDLIBPATH}}<code>%ENDLIBPATH%</code>: a list of directories to be searched for [[Dynamic-link library|DLL]]s like <code>[[#BEGINLIBPATH|%BEGINLIBPATH%]]</code>, but searched ''after'' the list of directories in <code>[[LIBPATH|%LIBPATH%]]</code>. ==={{anchor|WIN-ENV}}Windows === These environment variables refer to locations of critical operating system resources, and as such generally are not user-dependent.<ref>{{cite web | url=https://learn.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables | title=Recognized environment variables - Windows Deployment | date=9 January 2024 }}</ref> ;{{anchor|APPDATA}}<code>%APPDATA%</code><!-- all-uppercase at least under XP -->: Contains the full path to the ''[[Special folder|Application Data]]'' directory of the logged-in user. Does not work on Windows NT 4.0 SP6 UK. ;{{anchor|LOCALAPPDATA}}<code>%LOCALAPPDATA%</code>: This variable is the temporary files of ''Applications''. Its uses include storing of [[Theme (computing)|desktop themes]], [[Windows error reporting]], caching and profiles of web browsers. ;{{anchor|ComSpec|COMSPEC}}<code>%[[ComSpec]]%</code><!-- mixed case for CMD under XP -->/<code>%[[COMSPEC]]%</code>:The <code>%ComSpec%</code> variable contains the full path to the command processor; on the Windows NT family of operating systems, this is [[cmd.exe]], while on [[Windows 9x]], <code>%COMSPEC%</code> is [[COMMAND.COM]]. ;{{anchor|OS}}<code>%OS%</code>:The <code>%OS%</code> variable contains a symbolic name of the operating system family to distinguish between differing feature sets in [[batchjob]]s. It resembles an identically named environment variable <code>[[#%OS%|%OS%]]</code> found in all DOS-related operating systems of [[Digital Research]]-origin like Concurrent DOS, [[Multiuser DOS]], REAL/32, [[DOS Plus]], [[DR DOS]], Novell DOS and OpenDOS. <code>%OS%</code> always holds the string "<code>Windows_NT</code>" on the [[Windows NT family]].<ref name="Ten_XP"/> ;{{anchor|Path|PATH}}<code>%PATH%</code><!-- all-uppercase at least under XP -->: This variable contains a semicolon-delimited (do not put spaces in between) list of directories in which the command interpreter will search for an executable file that matches the given command. Environment variables that represent paths may be nested within the <code>%PATH%</code> variable, but only at one level of indirection. If this sub-path environment variable itself contains an environment variable representing a path, <code>%PATH%</code> will not expand properly in the variable substitution. Equivalent to the [[Unix]] <code>[[#$PATH|$PATH]]</code> variable. ;{{anchor|PROCESSOR_ARCHITECTURE|PROCESSOR_ARCHITEW6432|PROCESSOR_IDENTIFIER|PROCESSOR_LEVEL|PROCESSOR_REVISION}}<code>%PROCESSOR_ARCHITECTURE%</code>, <code>%PROCESSOR_ARCHITEW6432%</code>, <code>%PROCESSOR_IDENTIFIER%</code>, <code>%PROCESSOR_LEVEL%</code>, <code>%PROCESSOR_REVISION%</code>: These variables contain details of the [[CPU]]; they are set during system installation. ;{{anchor|PUBLIC}}<code>%PUBLIC%</code>: The <code>%PUBLIC%</code> variable (introduced with Vista) points to the ''Public'' (pseudo) user profile directory "<code>C:\Users\Public</code>". ;{{anchor|ProgramFiles|ProgramFiles(x86)|ProgramW6432}}<code>%ProgramFiles%</code>, <code>%ProgramFiles(x86)%</code>, <code>%ProgramW6432%</code>: The <code>%ProgramFiles%</code> variable points to the ''Program Files'' directory, which stores all the installed programs of Windows and others. The default on English-language systems is "<code>C:\Program Files</code>". In 64-bit editions of Windows (XP, 2003, Vista), there are also <code>%ProgramFiles(x86)%</code>, which defaults to "<code>C:\Program Files (x86)</code>", and <code>%ProgramW6432%</code>, which defaults to "<code>C:\Program Files</code>". The <code>%ProgramFiles%</code> itself depends on whether the process requesting the environment variable is itself 32-bit or 64-bit (this is caused by [[WoW64|Windows-on-Windows 64-bit]] redirection<ref>{{cite web | url=https://msdn.microsoft.com/en-us/library/aa384274.aspx#environment-variables | title=WOW64 Implementation Details }}</ref>). ;{{anchor|CommonProgramFiles|CommonProgramFiles(x86)|CommonProgramW6432}}<code>%CommonProgramFiles%</code>, <code>%CommonProgramFiles(x86)%</code>, <code>%CommonProgramW6432%</code>: This variable points to the ''Common Files'' subdirectory of the ''Program Files'' directory. The default on English-language systems is "<code>C:\Program Files\Common Files</code>". In 64-bit editions of Windows (XP, 2003, Vista), there are also <code>%ProgramFiles(x86)%</code>, which defaults to "<code>C:\Program Files (x86)</code>", and <code>%ProgramW6432%</code>, which defaults to "<code>C:\Program Files</code>". The <code>%ProgramFiles%</code> itself depends on whether the process requesting the environment variable is itself 32-bit or 64-bit (this is caused by [[WoW64|Windows-on-Windows 64-bit]] redirection). ;{{anchor|SystemDrive}}<code>%OneDrive%</code>: The <code>%OneDrive%</code> variable is a special system-wide environment variable found on Windows NT and its derivatives. Its value is the path of where (if installed and setup) the Onedrive directory is located. The value of <code>%OneDrive%</code> is in most cases "<code>C:\Users\{Username}\OneDrive\</code>". ;{{anchor|SystemDrive}}<code>%SystemDrive%</code>: The <code>%SystemDrive%</code> variable is a special system-wide environment variable found on Windows NT and its derivatives. Its value is the drive upon which the system directory was placed. The value of <code>%SystemDrive%</code> is in most cases "<code>C:</code>". ;{{anchor|SystemRoot}}<code>%SystemRoot%</code>:The <code>%SystemRoot%</code> variable is a special system-wide environment variable found on the Windows NT family of operating systems. Its value is the location of the system directory, including the drive and path. The drive is the same as <code>%SystemDrive%</code> and the default path on a clean installation depends upon the version of the operating system. By default: :* [[Windows XP]] and newer versions use "<code>\WINDOWS</code>". :* [[Windows 2000]], [[Windows NT 4.0|NT 4.0]] and [[Windows NT 3.1|NT 3.1]] use "<code>\WINNT</code>". :* [[Windows NT 3.5]] and [[Windows NT 3.51|NT 3.51]] uses "<code>\WINNT35</code>". :* [[Windows NT 4.0 Terminal Server]] uses "<code>\WTSRV</code>". ;{{anchor|windir}}<code>%windir%</code><!-- all-lowercase at least under Windows 95β98/98SE and Windows XP -->:This variable points to the ''Windows'' directory. (On the Windows NT family of operating systems, it is identical to the <code>%SystemRoot%</code> variable). [[Windows 95]]β[[Windows 98|98]] and [[Windows ME]] are, by default, installed in "<code>C:\Windows</code>". For other versions of Windows, see the <code>%SystemRoot%</code> entry above. ''User management variables''{{citation needed|date=August 2014|reason=Is this an official name used in Microsoft literature? If not, we should not italicize it and use the official name instead.}} store information related to resources and settings owned by various [[user profile]]s within the system. As a general rule, these variables do not refer to critical system resources or locations that are necessary for the OS to run. ;{{anchor|ALLUSERSPROFILE|PROGRAMDATA}}<code>%ALLUSERSPROFILE%</code><!-- all-uppercase at least under XP --> (<code>%PROGRAMDATA%</code> since Windows Vista): This variable expands to the full path to the ''All Users'' profile directory. This profile contains resources and settings that are used by all system accounts. [[Shortcut (computing)|Shortcut]] links copied to the ''All Users''\' ''Start menu'' or ''Desktop'' directories will appear in every user's ''Start menu'' or ''[[Desktop metaphor|Desktop]]'', respectively. ;{{anchor|USERDOMAIN}}<code>%USERDOMAIN%</code><!-- all-uppercase at least under XP -->: The name of the ''[[Workgroup (computer networking)|Workgroup]]'' or ''[[Windows Server domain|Windows Domain]]'' to which the current user belongs. The related variable, <code>%LOGONSERVER%</code>, holds the [[hostname]] of the server that authenticated the current user's login credentials (name and password). For home PCs and PCs in a workgroup, the authenticating server is usually the PC itself. For PCs in a Windows domain, the authenticating server is a [[domain controller]] (a primary domain controller, or PDC, in Windows NT 4-based domains). ;{{anchor|USERPROFILE}}<code>%USERPROFILE%</code><!-- all-uppercase at least under XP -->: A special system-wide environment variable found on Windows NT and its derivatives. Its value is the location of the current user's profile directory, in which is found that user's HKCU registry hive (<code>NTUSER</code>). Users can also use the <code>%USERNAME%</code> variable to determine the active users login identification. ''Optional System variables''{{citation needed|date=August 2014|reason=Is this an official name used in Microsoft literature? If not, we should not italicize it and use the official name instead.}} are not explicitly specified by default but can be used to modify the default behavior of certain built-in console commands. These variables also do not need to be explicitly specified as command line arguments. ==== Default values ==== The following tables shows typical default values of certain environment variables under English versions of Windows as they can be retrieved under <code>[[CMD (Windows)|CMD]]</code>. (Some of these variables are also defined when running <code>COMMAND.COM</code> under Windows, but differ in certain important details: Under <code>COMMAND.COM</code>, the names of environment variable are always uppercased. Some, but not all variables contain short [[8.3 filename|8.3]] rather than [[long file name]]s. While some variables present in the <code>CMD</code> environment are missing, there are also some variables specific to the <code>COMMAND</code> environment.) {| class="wikitable" |- ! Variable ! Locale specific ! Windows XP (CMD) ! Windows Vista and later (CMD) |- | {{mono|%ALLUSERSPROFILE%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|C:\Documents and Settings\All Users}} | {{mono|C:\ProgramData}}<ref name="Schulz_2014_Ordner"/> |- | {{mono|%APPDATA%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|C:\Documents and Settings\%USERNAME%\Application Data}} | {{mono|C:\Users\%USERNAME%\AppData\Roaming}}<ref name="Schulz_2014_Ordner"/> |- | {{mono|%CommonProgramFiles%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|C:\Program Files\Common Files}} | {{mono|C:\Program Files\Common Files}}<ref name="Schulz_2014_Ordner"/> |- | {{mono|%CommonProgramFiles(x86)%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|C:\Program Files (x86)\Common Files}} ''(only in 64-bit version)'' | {{mono|C:\Program Files (x86)\Common Files}} ''(only in 64-bit version)''<ref name="Schulz_2014_Ordner"/> |- | {{mono|%CommonProgramW6432%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|%CommonProgramW6432%}} ''(not supported, not replaced by any value)'' | {{mono|C:\Program Files\Common Files}} ''(only in 64-bit version)''<ref name="Schulz_2014_Ordner"/> |- | {{mono|%COMPUTERNAME%}} | {{No}} | {computername} | {computername} |- | {{mono|%ComSpec%}} | {{No}} | {{mono|C:\Windows\System32\cmd.exe}} | {{mono|C:\Windows\System32\cmd.exe}} |- {{anchor|%HOMEDRIVE%}} | {{mono|%HOMEDRIVE%}}<ref name="Schulz_2014_Ordner"/> | {{No}} | C: | C:<ref name="Schulz_2014_Ordner"/> |- {{anchor|%HOMEPATH%}} | {{mono|%HOMEPATH%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|\Documents and Settings\%USERNAME%}} | {{mono|\Users\%USERNAME%}}<ref name="Schulz_2014_Ordner"/> |- | {{mono|%LOCALAPPDATA%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|%LOCALAPPDATA%}} ''(not supported, not replaced by any value)'' | {{mono|C:\Users\%USERNAME%\AppData\Local}}<ref name="Schulz_2014_Ordner"/> |- | {{mono|%LOGONSERVER%}} | {{No}} | {{mono|\\{domain_logon_server} }} | {{mono|\\{domain_logon_server} }} |- | {{mono|%PATH%}} | {{Yes}} | {{mono|C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;{plus program paths} }} | {{mono|C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;{plus program paths} }} |- | {{mono|%PATHEXT%}} | {{No}} | .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.WSF;.WSH | .com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.msc |- | {{mono|%ProgramData%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|%ProgramData%}} ''(not supported, not replaced by any value)'' | {{mono|%SystemDrive%\ProgramData}}<ref name="Schulz_2014_Ordner"/> |- | {{mono|%ProgramFiles%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|%SystemDrive%\Program Files}} | {{mono|%SystemDrive%\Program Files}}<ref name="Schulz_2014_Ordner"/> |- | {{mono|%ProgramFiles(x86)%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|%SystemDrive%\Program Files (x86)}} ''(only in 64-bit version)'' | {{mono|%SystemDrive%\Program Files (x86)}} ''(only in 64-bit version)''<ref name="Schulz_2014_Ordner"/> |- | {{mono|%ProgramW6432%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|%ProgramW6432%}} ''(not supported, not replaced by any value)'' | {{mono|%SystemDrive%\Program Files}} ''(only in 64-bit version)''<ref name="Schulz_2014_Ordner"/> |- | {{mono|%PROMPT%}} | {{No}} | Code for current command prompt format, usually {{code|$P$G}} | Code for current command prompt format, usually {{code|$P$G}} |- | {{mono|%PSModulePath%}} | | {{mono|%PSModulePath%}} ''(not supported, not replaced by any value)'' | {{mono|%SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\}} |- | {{mono|%PUBLIC%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|%PUBLIC%}} ''(not supported, not replaced by any value)'' | {{mono|%SystemDrive%\Users\Public}}<ref name="Schulz_2014_Ordner"/> |- | {{mono|%SystemDrive%}}<ref name="Schulz_2014_Ordner"/> | {{No}} | C: | C:<ref name="Schulz_2014_Ordner"/> |- | {{mono|%SystemRoot%}}<ref name="Schulz_2014_Ordner"/> | {{No}} | The Windows directory, usually {{mono|C:\Windows}}, formerly {{mono|C:\WINNT}} | {{mono|%SystemDrive%\Windows}}<ref name="Schulz_2014_Ordner"/> |- | {{mono|%TEMP%}}<ref name="Schulz_2014_Ordner"/> and {{mono|%TMP%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|%SystemDrive%\Documents and Settings\%USERNAME%\Local Settings\Temp}} | {{mono|%SystemRoot%\TEMP}} (for system environment variables {{mono|%TMP%}} and {{mono|%TEMP%}}),<br/>{{mono|%USERPROFILE%\AppData\Local\Temp}}<ref name="Schulz_2014_Ordner"/> (for user environment variables {{mono|%TMP%}} and {{mono|%TEMP%}}) |- | {{mono|%USERDOMAIN%}} | {{No}} | {userdomain} | {userdomain} |- | {{mono|%USERNAME%}} | {{No}} | {USERNAME} | {USERNAME} |- | {{mono|%USERPROFILE%}}<ref name="Schulz_2014_Ordner"/> | {{Yes}} | {{mono|%SystemDrive%\Documents and Settings\%USERNAME% }} | {{mono|%SystemDrive%\Users\%USERNAME% }}<ref name="Schulz_2014_Ordner"/> |- | {{mono|%windir%}}<ref name="Schulz_2014_Ordner"/> | {{No}} | {{mono|%SystemDrive%\WINDOWS}} | {{mono|%SystemDrive%\Windows}}<ref name="Schulz_2014_Ordner"/> |} In this list, there is no environment variable that refers to the location of the user's ''My Documents'' directory, so there is no standard method for setting a program's home directory to be the ''My Documents'' directory.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)