I need to read and write files that contain application specific data, shared between all the users.
I tried to use Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)
, but it returns only C:\ProgramData.
My question is :
Does it exist a system like Path.GetDirectoryName(Application.UserAppDataPath)
, which will give me the exact folder to write, according to my application name and version?
Or is ProgramData not the right place to do that.
Thanks.
Best Answer
I think CommonApplicationData is exactly what you're looking for, as it's the global folder for all applications which are not bound to a user.
There's also SpecialFolder.LocalApplicationData for user-bound data.