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!
==== 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)