Hello all, I have a client in which every time I install their software I have to change folder and registry permissions in order for it to work correctly. I would really like to save time and have a batch file to add the group "Domain Users" to the permissions. I would also like to do this for registry keys but am unsure how to go about it. I need to: Add full control for "Domain Users" to the registry key's: HKLM\SOFTWARE\Borland Share HKLM\SOFTWARE\ishare Any help would be greatly appreciated!! Thanks!
This snip gives full control to "Network Service" on a specific registry key. I'm sure the op can edit to suit his needs. Hint, you'll need to do it twice, once for each key. Code: $acl = Get-Acl -Path "registry::HKEY_USERS\S-1-5-20"; $permission = "Network Service","FullControl","ContainerInherit, ObjectInherit", "None","Allow"; $accessRule = New-Object System.Security.Accesscontrol.RegistryAccessRule $permission; $acl.SetAccessRule($accessRule); $acl | Set-Acl -Path "registry::HKEY_USERS\S-1-5-20"