When creating an application that will be targeted to many versions of Windows what is the best practice to determine where application specific data should be stored. Specifically:
- Application Specific Data (e.g. app config data)
- User Specific Data/Settings
I know on Windows Vista for instance there are environment variables, like %APPDATA%, that could be used, but what about Windows 7, Windows XP, Windows 98.
My main question is, does Microsoft have a best practices doc for this, outlining the file system locations for the different types of data (app vs. user) and the security implications that need to be kept in mind when reading/writing to these locations?
I'm also interested in how this pertains to not only .NET applications (where ApplicationSettingsBase can be utilized) but also in unmanaged C/C++ applications.
Thanks to Pax and Remus for both of the great answers.
I've found this item as well (specific to XP):
How to write a Windows XP Application that stores user and application data in the correct location by using Visual C++
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…