Where should I save data related to my application? Where should I save configuration files? Where should I save temporary files? Should I do it in \"Documents\"? \"AppData\
ApplicationData: Everything that your application needs as "per user" data and does not fall under other categories. Standard configuration files would go here.
CommonApplicationData: Everything that is not "per user" data.
LocalApplicationData: Data that is per user and non-roaming. For example, everything where you want to ENSURE that it is only stored on this machine (like machine activation codes, often also cache/temporary data). Standard temporary files would go here.
MyDocuments: User data that the user actually would identify as "recognizable single documents".
If you don't care about the filename, you can also use a tempfile API to generate a temporary file in the temp
directory. You should NOT do this manually. In, for example, .NET you can use Path.GetTempFileName()
for that purpose.
From Windows 7 Client Software Logo Program:
In addition you should use SHGetFolderPath or SHGetKnownFolderPath (in Vista+) to get the paths. This will provide you the correct location on the current system regardless of the version or the language of the current installation. Never hard code any path you are using.
AppData should be automatic configuration and profiles, documents should only be user saved files. I would put anything that could be useful in multiple systems in AppData/Roaming, and anything else (machine specific) in AppData/Local or LocalLow. For temporary files, use the Temp directory.
In general, Windows best practices are to follow the appropriate environment variables. Configuration data that you want to stick around should go in %APPDATA%, and temporary files should go in %TEMP%.
This has the advantage of not breaking horribly if Windows changes things, and respecting strange configurations people may have.
Also, I agree with other answers that "Documents" should only be for user-created data and only after a prompt.