Follow:

Microsoft Volume Licensing Blogtwitter

Common folder variables

A variable folder is a folder that might refer to different places on different PCs.

Malware will often use a variable folder when it tries to access, change, or create files and folders on your PC.

The opposite of a variable folder is a hardcoded folder, which is always in the same place on every PC.

The default locations of the variable folders that we use in our encyclopedia are listed on this page.

You can find the location of a variable folder that starts and ends with %:

  1. Open a Windows Explorer window (the keyboard shortcut is Windows logo key+E).

  2. Type the name of the variable in the address bar, including the % sign at the start and end of the variable (such as %APPDATA%). Press Enter.

  3. The location of that variable on your PC will be shown. This may change between different PCs.

  4. This will not work for variables that do not start and end with %, such as <system folder> or <start menu>. Instead, your Internet browser will open search the web for the variable.

In Windows 8.1, Windows 7, and Windows Vista, variable folders are called known folders.

In Windows XP and Windows 2000, variable folders are called CSIDL values.

%ALLUSERSPROFILE% 
Windows XP and Windows 2000C:\Documents and Settings\All Users
Windows 8.1, Windows 7, and Windows VistaReferred to as %ProgramData%
%APPDATA% 
Windows XP and Windows 2000C:\Documents and Settings\<user name>\Application Data
Windows 8.1, Windows 7, and Windows VistaC:\Users\<user name>\AppData\Roaming
<commonappdata> 
Windows XP and Windows 2000C:\Documents and Settings\All Users\Application Data
Windows 8.1, Windows 7, and Windows VistaC:\ProgramData
%CommonProgramFiles% 
Windows XP and Windows 2000C:\Program Files\Common Files
Windows 8.1, Windows 7, and Windows VistaC:\Program Files\Common Files
%HOMEPATH% 
Windows XP and Windows 2000\Documents and Settings\<user name>
Windows 8.1, Windows 7, and Windows Vista\Users\<user name>
%LOCALAPPDATA% 
Windows XP and Windows 2000C:\Documents and Settings\<user name>\Local Settings\Application Data
Windows 8.1, Windows 7, and Windows VistaC:\Users\<user name>\AppData\Local
%ProgramData% 
Windows XP and Windows 2000Referred to as %ALLUSERSPROFILE%
Windows 8.1, Windows 7, and Windows VistaC:\ProgramData
%ProgramFiles% 
Windows XP and Windows 2000C:\Program Files or C:\Program Files (x86)
Windows 8.1, Windows 7, and Windows VistaC:\Program Files or C:\Program Files (x86)
%ProgramW6432% 
Windows XP and Windows 2000N/A
Windows 8.1, Windows 7, and Windows VistaN/A for Windows Vista; varies for Windows 8.1 and Windows 7. See WOW64 Implementation Details for more information.
%PUBLIC% 
Windows XP and Windows 2000N/A
Windows 8.1, Windows 7, and Windows VistaC:\Users\Public
$recycle.bin 
Windows XP and Windows 2000Windows recycle bin (hidden location)
Windows 8.1, Windows 7, and Windows VistaWindows recycle bin (hidden location)
<start menu> 
Windows XP and Windows 2000C:\Documents and Settings\<user name>\Start Menu or
C:\Users\<user name>\Start Menu
Windows 8.1, Windows 7, and Windows VistaC:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu
<startup folder> 
Windows XP and Windows 2000C:\Documents and Settings\<user name>\Start Menu\Programs\Startup
Windows 8.1, Windows 7, and Windows VistaC:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
%SystemDrive% 
Windows XP and Windows 2000C:
Windows 8.1, Windows 7, and Windows VistaC:
<system folder> 
Windows XP and Windows 2000C:\WinNT\System32
Windows 8.1, Windows 7, and Windows VistaC:\Windows\System32
%SystemRoot% 
Windows XP and Windows 2000C:\Windows
Windows 8.1, Windows 7, and Windows VistaC:\Windows
%TEMP% 
Windows XP and Windows 2000C:\DOCUME~1\<user name>\LOCALS~1\Temp
Windows 8.1, Windows 7, and Windows VistaC:\Users\<user name>\AppData\Local\Temp
%USERPROFILE% 
Windows XP and Windows 2000C:\Documents and Settings\<user name> or
C:\Users\<user name>
Windows 8.1, Windows 7, and Windows VistaC:\Users\<user name>