9

Is there an environment variable that by default points to C:\Users\%USERNAME%\AppData\Temp in Windows 7?

Or maybe C:\Users\%USERNAME%\AppData\local\Temp for that matter?

Also what are these referred to as?

leeand00
  • 21,508
  • 43
  • 120
  • 182
  • Found the answer here: http://superuser.com/questions/234546/appdata-and-localappdata-environment-variables-are-not-set-on-a-profile-in-windo?rq=1 – leeand00 May 20 '16 at 12:20
  • 2
    Possible duplicate of [What are PATH and other environment variables, and how can I set or use them?](http://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them) – Ƭᴇcʜιᴇ007 May 20 '16 at 13:16
  • I was wrong it's actually `%temp%` – leeand00 May 20 '16 at 13:19
  • Not a duplicate. Dupe does not mention `%temp%` or `%tmp%` – DavidPostill May 21 '16 at 08:51

1 Answers1

12

Is there an environment variable that by points to

C:\Users\%USERNAME%\AppData\Temp

No

Or maybe

C:\Users\%USERNAME%\AppData\local\Temp

The default value for %TEMP% and %TMP% is C:\Users\{username}\AppData\Local\Temp


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\

Source Windows 7 Environment variables

DavidPostill
  • 153,128
  • 77
  • 353
  • 394