SCCM Package for Registry Permissions Change

Orignally I have Powershell script for doing that, but it turns out not so good:

if (!(Test-Path HKCC:))
{New-PSDrive -PSProvider registry -Root HKEY_CURRENT_CONFIG -Name HKCC}
$RegPath= ”HKCC:\SOFTWARE\XXX”
New-Item -Path ”HKCC:\SOFTWARE\” -Name Encompass -Force
$acl = Get-Acl $RegPath
$rule = New-Object System.Security.AccessControl.RegistryAccessRule (“BUILTIN\Users”,”FullControl”,”Allow”)
$rule2 = New-Object System.Security.AccessControl.RegistryAccessRule (“Everyone”,”FullControl”,”Allow”)
$acl.SetAccessRule($rule)
$acl.SetAccessRule($rule2)

Here is the bath file to do the registry permissions change:

reg add “HKCC\SOFTWARE\XXX” /f
REGPERM /K “HKEY_CURRENT_CONFIG\SOFTWARE\XXX” /A:Everyone:F /E /I /F

Here is the little program can make great registry permission change:

regperm

 

 

Leave a Reply