C:\ProgramData\CompanyName folder created by ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None) method does not have everyone modify access RRS feed

  • Question

  • Hi,

    Our application creates the folder (say CompanyName folder) in C:\ProgramData folder and puts the config file in that folder during. And the application modifies the config file for some setting during exiting the application.

    In Windows 10, when we create the CompanyName folder and config file in ProgramData folder using

    securityIdentifier =

    NewSecurityIdentifier(WellKnownSidType.WorldSid, Nothing)

    with FileSystemRights.Write, Read and Modify access, all the power users of the machine can access and modify the config file.

    But when I use below code to create the CompanyName folder and config file in ProgramData folder, it does not give Everyone the access and then power users cannot modify the config file.

    config =


    So I want to know how can I create the config file in ProgramData folder using ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None) which will have everyone the Write, Read and Modify access, so that power user can modify the config file?

    Hrushikesh Pande

    Monday, June 12, 2017 9:50 AM

All replies

  • You are the one creating the folder in Programdata. So why can't you set permission on the created folder as needed? You can use Everyone or Authenticated user on the folder with the permission set by you.


    Monday, June 12, 2017 11:53 AM