I have gone through many discussions on multiple forums where people were discussing about how CommonAppDataFolder can be used to store per-machine files.
My application has a requirement where I need to store an XML
file is a shared location such that all users running my application can read/write to that file.
I understand that CommonAppDataFolder
( C:\\ProgramData
for Windows 7) allows admins to have read access but doesn't allow standard users to write to the file.
One of the solutions I came across is to change the permissions of the application folder in CommonAppDataFolder
to allow read/write for all users.
Is this the best way to achieve my requirement or is there a better way suggested by Microsoft?
我建议您使用: Environment.SpecialFolder.CommonDocuments
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.