Our win32 applications (written in C++) have been around for over 10 years, and haven\'t been updated to follow \"good practices\" in terms of where they keep files. The applica
Presumably, it's "best practices" to default to installing under "c:\Program Files\AppName"
Close, but not quite. Users can configure the name of the Program Files folder and may not even have a C: drive. Instead, install to the %ProgramFiles%\AppName
environment variable folder. Note that you should assume you only have read access to this folder after the installation has finished.
For program data files where you might need write access, use %AppData%\AppName
.
Finally, are you sure yours is the only app with that name? If you're not 100% certain of that, you might want to include your company name in there as well.
The mechanisms you use to retrieve those variables will vary depending on your programming platform. It normally comes down to the SHGetFolderPath()
Win32 method in the end, but different platforms like Java or .Net may provide simpler abstractions as well.