What is the difference between ProgramData and AppData?

To put it straight, ProgramData contains application data that is not user specific.This data will be available to all users on the computer. Any global data should be put in here. AppData folder contains configuration settings, downloaded information/files for a particular user. So, for example any user specific preferences and profile configurations can be stored … Read more

How to get the %AppData% folder in C?

Use SHGetSpecialFolderPath with a CSIDL set to the desired folder (probably CSIDL_APPDATA or CSIDL_LOCAL_APPDATA). You can also use the newer SHGetFolderPath() and SHGetKnownFolderPath() functions. There’s also SHGetKnownFolderIDList() and if you like COM there’s IKnownFolder::GetPath().

How to open a folder in %appdata% with C++?

For maximum compatibility with all versions of Windows, you can use the SHGetFolderPath function. It requires that you specify the CSIDL value for the folder whose path you want to retrieve. For the application data folder, that would be CSIDL_APPDATA. On Windows Vista and later, you should use the SHGetKnownFolderPath function instead, which requires that … Read more