[Windows] Update google updater service name parser (#9738)

This commit is contained in:
sergei-pyshnoi
2024-04-24 22:49:24 +02:00
committed by GitHub
parent a420c2896e
commit cb3f1150db
2 changed files with 6 additions and 9 deletions

View File

@@ -12,7 +12,7 @@ Install-Binary `
Write-Host "Adding the firewall rule for Google update blocking..."
New-NetFirewallRule -DisplayName "BlockGoogleUpdate" -Direction Outbound -Action Block -Program "C:\Program Files (x86)\Google\Update\GoogleUpdate.exe"
$googleServices = @('gupdate', 'gupdatem') | Get-Service
$googleServices = Get-Service -Name "GoogleUpdater*"
Stop-Service $googleServices
$googleServices.WaitForStatus('Stopped', "00:01:00")
$googleServices | Set-Service -StartupType Disabled