ProgramData folder - user has no permission on a newly installed Windows

VASARI Akos 0 Reputation points
2024-10-07T06:42:39.5266667+00:00

We have an installer, which wants to write program-relevant information in C:\ProgramData, and it has permission problems on a newly installed Windows. I noticed that as a normal User (not Admin) the permissions are somehow not yet configured on a fresh machine.

So if I install a copy of Windows on a test machine, and then I create a user immediately after, the user can not write in C:\ProgramData. But if I double-click the C:\Users\Admin folder as the same user, after a few seconds all the permissions will be there, and I can write in ProgramData.

Is there a reason behind this? What happens exactly? Can I simulate this behavior in my install script somehow?

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-10-08T07:30:10.8433333+00:00

    Hello VASARI Akos,

    Thank you for posting in Q&A forum.

    When you create a new user on a Windows machine, the permissions for certain system folders, like C:\ProgramData, are not immediately granted to the new user. This is because these folders have special permissions to ensure system stability and security. Only users with administrative privileges can modify their contents.

    However, when you access the C:\Users\Admin folder, Windows performs some background tasks to update the user's profile and permissions. 

    You can use the icacls command to modify permissions. For example:

    icacls "C:\ProgramData" /grant <username>:(OI)(CI)(M)

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards,

    Daisy Zhou

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    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.