0

We save our Project config file in C:\ProgramData\MyApplication path.

When Power User is using our application while closing the application, System.Configuration.Save() method gives Access is denied Error to the above path.

Admin can add a user as Power User in Windows
By default, members of this group have no more user rights or permissions than a standard user account. The Power Users group in previous versions of Windows was designed to give users specific administrator rights and permissions to perform common system tasks. In this version of Windows, standard user accounts inherently have the ability to perform most common configuration tasks, such as changing time zones. For legacy applications that require the same Power User rights and permissions that were present in previous versions of Windows, administrators can apply a security template that enables the Power Users group to assume the same rights and permissions that were present in previous versions of Windows
.

I investigated on the net and found out that you have to give explicit permission to the config file for that Power User. But in our case, We can't give explicit permission to the file for the power user.

So how can we save the config file changes for power user without giving explicit permissions?

Thanks in advance !!!!

Jumbo
  • 35
  • 8
  • http://www.blogtechnika.com/what-is-application-data-folder-in-windows-7/ – Mederic May 04 '17 at 11:17
  • also here there is use of appdata because don't have the correct rights. http://stackoverflow.com/questions/43737622/programatically-retrieve-the-full-data-directory-path-in-vb-net/43738728#43738728 – Mederic May 04 '17 at 11:21
  • What is a Power User? Does the application run with administrator rights? – Dávid Molnár May 04 '17 at 13:30
  • @DávidMolnár : I have added the definition of Power Userin post – Jumbo May 05 '17 at 05:10
  • Scenario : Our product is installed by Admin ,So the product folder and config files is created by admin and the Product Folder (which is under ProgramData) has permission of "CREATOR OWNER" and config file has "SYSTEM".So because of this other users facing problem to write the config file and coming across the error of "Access is denied". – Jumbo May 22 '17 at 07:01

0 Answers0