Skip to content

Instantly share code, notes, and snippets.

@b4tman
Created March 9, 2022 08:54
Show Gist options
  • Save b4tman/8ec5e6ea537a7afdb96d2e696cf312ba to your computer and use it in GitHub Desktop.
Save b4tman/8ec5e6ea537a7afdb96d2e696cf312ba to your computer and use it in GitHub Desktop.
Stop-Service wuauserv
Set-Service -Name wuauserv -StartupType disabled
$NewAcl = Get-Acl -Path "C:\WINDOWS\system32\wuaueng.dll"
Set properties
#$identity = "BUILTIN\Administrators"
$identity = "Администраторы"
$fileSystemRights = "FullControl"
$type = "Allow"
$fileSystemAccessRuleArgumentList = $identity, $fileSystemRights, $type
$fileSystemAccessRule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $fileSystemAccessRuleArgumentList
$NewAcl.SetAccessRule($fileSystemAccessRule)
Set-Acl -Path "C:\WINDOWS\system32\wuaueng.dll" -AclObject $NewAcl
Rename-Item -Path "C:\WINDOWS\system32\wuaueng.dll" -NewName "wuaueng_old.dll"
New-Item -Path "C:\WINDOWS\system32\" -Name "wuaueng.dll" -ItemType "file" -Value "Заглушка"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment