Search notes:

Windows environment variables: TEMP and TMP

As Raymond Chen points out, the values of %TEMP% and %TMP% are silently converted to short name (aka 8.3) format, if possible.
The value of these two variables is assigned to the value %USERPROFILE%\AppData\Local\Temp in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\DefaultUserEnvironment
See also C:\Users\username\AppData\Local\Temp
The TEMP environment variable might contain a tilde (~) which is used to shorten long paths:
PS C:\> $env:temp
C:\Users\DOMA~1.REN\AppData\Local\Temp
At times, the value of $env:temp needs to be expanded to the real path. This is possible with
PS C:\> [System.IO.File]::GetFullPath($env:temp)
C:\Users\DOMAIN.Rene\AppData\Local\Temp

See also

Windows environment variables

Index