C:\ProgramData files editing using administrator profile.

RFprofile 1 Reputation point
2022-10-19T13:55:59.573+00:00

Dear All,

we've got a software developed using .net and installed using an administrator profile on a Windows 10 client in a domain.

On the first execution, an xml configuration file has been created in c:\programdata..\filename.xml with the same administrator user's profile.

If we try to edit the xml file with another user's administrator profile, we are asked to save another file because the update of the existing one is not permitted.

We are able instead to update the file executing notepad from an administrator powershell session, but we need that all administrators's group users on the client can edit and save the file.

Please, we need support to solve this problem, any suggestion is really appreciate.

Thanks and kind regards.

Roberto

Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,956 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 45,366 Reputation points
    2022-10-20T06:46:23.713+00:00

    but we need that all administrators's group users on the client can edit and save the file.

    That's the way it works, any modification of file located in "Program Files" requires admin permission; don't try to change it, it will fail.

    Save the config file instead in ProgramData folder:
    https://learn.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-shell-setup-folderlocations-programdata

    0 comments No comments

  2. RFprofile 1 Reputation point
    2022-10-20T09:51:08.977+00:00

    Dear OlafHelper,

    thank you very much for your reply, unfortunately we are already working with the c:\programdata folder and the problem in with an xml file in a subfolder of this one. Any other suggestions will be really appreciate.

    Kind regards.

    Roberto

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.