Where do I store files on Vista/Win7 for all users with read/write permission [duplicate]
Possible Duplicate:
Where to put common writable application files?
In my application I have some setting-files, which needs read/write permission and should be accessable by all users.
So far I found in the net is, that microsoft gives you some special folders in Win Vista/7, but none of them fulfills my needs:
1) CSIDL_COMMON_APPDATA => C:\ProgramData, has no write permission 2) CSIDL_APPDATA => is user specifc 3) CSIDL_LOCAL_APPDATA => is user specificHow can I access such folder, which contains APP DATA, is accessable by all users and has read/write permissio开发者_StackOverflown?
on a system wide installation, you have to write them to CSIDL_COMMON_APPDATA. but you have also to set the permissions within your setup.
don't give rights to "everybody" - "authenticated" is better
if you are using windows installer, then you have to take care of users and system installations. if it is a user installation, you have to write to the CSIDL_APPDATA or CSIDL_LOCAL_APPDATA (depending of roaming or not roaming data).
If you understand german take a look in the entwickler magazin 3.2011. there will be a article "Einstellungssache", which is on topic.
MSDN - Data and Settings Management
精彩评论