Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi all,

I would like to know where would be the best location to create a file on a client PC, where there is restricted security right (group policies)?

I read an article that states the following location:

Environment.SpecialFolder.LocalApplicationData


Is that correct?
Many thanks in advance.
Kind regards,
Posted

Environment.SpecialFolder.LocalApplicationData

Yes It is correct.

or you could use

Environment.SpecialFolder.ApplicationData


At those location all the installed application stores data, if you have noticed.

Please vote and Accept Answer if it Helped.
 
Share this answer
 
v2
It depends on what the data is. If the data must be available to ALL users i.e. it is for the application regardless of the user then use;
Environment.SpecialFolder.CommonApplicationData

If the data is specific to a single user then use;
Environment.SpecialFolder.ApplicationData
OR
Environment.SpecialFolder.LocalApplicationData


You use Environment.SpecialFolder.ApplicationData for specific user data as a general rule because data stored here is also replicated if roaming profiles are used.
 
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