Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .MSEInstall.exe /s /runwgacheck /o
- Start-Sleep 5 # I have no idea how to wait for the installer to finish
- Set-ItemProperty "HKLM:SOFTWAREMicrosoftMicrosoft AntimalwareScan"
- ScheduleDay "0"
- Set-ItemProperty : Requested registry access is not allowed.
- $user = whoami
- $regPath = "SOFTWAREMicrosoftMicrosoft AntimalwareScan"
- $key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($regPath, [Microsoft.Win32.RegistryKeyPermissionCheck]::ReadWriteSubTree,[System.Security.AccessControl.RegistryRights]::ChangePermissions)
- $acl = $key.GetAccessControl()
- $rule = New-Object System.Security.AccessControl.RegistryAccessRule ($user,"FullControl","Allow")
- $acl.SetAccessRule($rule)
- $key.SetAccessControl($acl)
- Exception calling "OpenSubKey" with "3" argument(s): "Requested registry access is not allowed.
Add Comment
Please, Sign In to add comment