Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My Windows desktop app shares settings between Windows users, so I keep a settings file under AllUsers Application Data (wherever that might end up). All works fine on WinXP but on Vista/7 I find that only Windows Administrators can change files this area. I don't yet provide a manifest so each user thinks he can change settings but virtualization ensures that each user actually has his OWN settings file. This breaks the idea of Common (allUsers) AppData.

I could always run my app at Elevated access - BAD idea! for many reasons.

I can set the ACL on my AppData folder at installation time - ok until someone cleans up or loses my folder when subtle bugs happen.

I'm tempted to put the settings back into my Program Files installation folder and set the file's ACL there - would this work? Could I set up a user-writable folder within my installation folder?

Where is my shared application data expected to live?
Posted
Updated 29-Jan-10 0:18am
v3

1 solution

I wouldn't suggest playing with ACL at installation time: if you app is installed in a business environment, for example, the changes may fail.

Be careful about putting things in your installation folder as well. If your program ends up in Program Files, you could end up with the same problem.

What are you using to make the program? If you're using the .Net Framework, you could try using the built in Settings features which can have Application scope settings as well as User ones.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900