If you have a Windows application that needs to write working files as part of its normal operation (not prompted by the user):
- Where on the file system should they be written?
- What’s the correct way to get this directory in .NET for all Windows versions (XP/V/7/Server)?
(Writing to the same directory as the executable or a “temp” directory are not suitable for my specific case.)
The most common place would be:
But there are other values of Environment.SpecialFolder that could be useful. And of course there is the User’s
Documentsfolder.And you say you don’t want a Temp file but if you need it in 1 session,
can be very useful.