Search code examples
c++windowsspecial-foldersappdata

What are the default APPDATA directories each version of Windows?


Is there a list of default APPDATA directories each version of Windows? (XP & up)

I need to know the default directory each OS will return for the following call:

SHGetSpecialFolderLocation( NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE , &pidl );

Solution

  • There isn't really a simple answer to make into a list even for just english installs.

    Here are some examples I just pulled from a few machines.

    Windows 8 - C:\Users\%USERNAME%\AppData\Roaming
    Windows 7 - C:\Users\%USERNAME%\AppData\Roaming
    2K8    -    C:\Users\%USERNAME%\AppData\Roaming
    Vista   -   C:\Users\%USERNAME%\AppData\Roaming
    XP     -    C:\Documents and Settings\%USERNAME%\Application Data
    2K3    -    C:\Documents and Settings\%USERNAME%\Application Data
    

    you will get different answers for when you Roam or not, when you use a remote desktop etc.