One Day Sec

What are the main differences in environment variables between SYSTEM privileges and administrator privileges?

Under SYSTEM privileges, environment variables like APPDATA, Temp, Tmp, USERDOMAIN, USERNAME, and USERPROFILE point to system-level paths. For example, `echo %appdata%` returns `C:\Windows\system32\config\systemprofile\AppData\Roaming`, whereas an administrator sees `C:\Users\a\AppData\Roaming`. Similarly, the API `SHGetSpecialFolderPath` returns different paths depending on the privilege level. These differences can prevent tools like desktop capture from working correctly.
environment variablesAPPDATASHGetSpecialFolderPathsystem profileprivilege difference

Browse all Q&A →