I have a Windows Server 2008 32 bit and when I\'m typing %temp% it takes me to ..AppData\\Local\\Temp\\1\\ or ..AppData\\Local\\Temp\\2 instead of ..AppData\\Local\\Temp
Environment variables have 4 contexts:
(do Win+R then type regedit to find the paths below)
HKLM\System\CurrentControlSet\Control\Session Manager\Environment)HKCU\Environment)HKCU\VolatileEnvironment)ref: https://rakhesh.com/windows/temp-environment-variable-has-a-2-or-other-number-after-it/
When the Group Policy Do not use temporary folders per session isn't configured or isn't set to Enabled, the system will generate two Volatile Environment variables TEMP & TMP with the same value of the current user's TEMP variable with the addition of an incremental number at the end of the TEMP folder (increments each time the user logs in, check @Damien's answer for details)
If you set the group policy Do not use temporary folders per session to enabled, this behavior will not occur.