Windows XP Environment variables
Windows 7 Environment variables
| Variable | Windows Vista/7 |
| %ALLUSERSPROFILE% (%PROGRAMDATA%) | C:\ProgramData |
| %APPDATA% | C:\Users\{username}\AppData\Roaming |
| %COMPUTERNAME% | {computername} |
| %COMMONPROGRAMFILES% | C:\Program Files\Common Files |
| %COMMONPROGRAMFILES(x86)% | C:\Program Files (x86)\Common Files |
| %COMSPEC% | C:\Windows\System32\cmd.exe |
| %HOMEDRIVE% | C: |
| %HOMEPATH% | \Users\{username} |
| %LOCALAPPDATA% | C:\Users\{username}\AppData\Local |
| %LOGONSERVER% | \\{domain_logon_server} |
| %PATH% | C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;{plus program paths} |
| %PATHEXT% | .com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.msc |
| %PROGRAMFILES% | C:\Program Files |
| %PROGRAMFILES(X86)% | C:\Program Files (x86) (only in 64-bit version) |
| %PROMPT% | Code for current command prompt format. Code is usually $P$G |
| %SystemDrive% | C: |
| %SystemRoot% | C:\Windows |
| %TEMP% and %TMP% | C:\Users\{username}\AppData\Local\Temp |
| %USERDOMAIN% | {userdomain} |
| %USERNAME% | {username} |
| %USERPROFILE% | C:\Users\{username} |
| %WINDIR% | C:\Windows |
| %PUBLIC% | C:\Users\Public |
| %PROGRAMDATA% | C:\ProgramData |
| %PSModulePath% | %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\ |
Binbert Technology | Computer | Security | Networking | Mobile
Nice work.
I was searching for some of these variables.
If you’re looking for the real values to just throw in there (default to windows):
(User) TMP and TEMP are ‘%USERPROFILE%\AppData\Local\Temp’
(Windows) TMP and TEMP are ‘%SystemRoot%\TEMP’
Not trying to be Debbie Downer here but honestly put the values in there that Windows uses by default… not sure where you get this {stuf}, because %this% is more appropriate!
Either way, thanks!