mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
[Windows] Update google updater service name parser (#9738)
This commit is contained in:
@@ -12,7 +12,7 @@ Install-Binary `
|
|||||||
Write-Host "Adding the firewall rule for Google update blocking..."
|
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"
|
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
|
Stop-Service $googleServices
|
||||||
$googleServices.WaitForStatus('Stopped', "00:01:00")
|
$googleServices.WaitForStatus('Stopped', "00:01:00")
|
||||||
$googleServices | Set-Service -StartupType Disabled
|
$googleServices | Set-Service -StartupType Disabled
|
||||||
|
|||||||
@@ -28,14 +28,11 @@ Describe "Chrome" {
|
|||||||
$versionInfo | Should -Not -BeNullOrEmpty
|
$versionInfo | Should -Not -BeNullOrEmpty
|
||||||
}
|
}
|
||||||
|
|
||||||
It "gupdate service is stopped" {
|
It "GoogleUpdater services is stopped" {
|
||||||
$svc = Get-Service -Name gupdate
|
$services = Get-Service -Name "GoogleUpdater*"
|
||||||
$svc.Status | Should -BeExactly Stopped
|
foreach ($svc in $services) {
|
||||||
}
|
$svc.Status | Should -BeExactly 'Stopped'
|
||||||
|
}
|
||||||
It "gupdatem service is stopped" {
|
|
||||||
$svc = Get-Service -Name gupdatem
|
|
||||||
$svc.Status | Should -BeExactly Stopped
|
|
||||||
}
|
}
|
||||||
|
|
||||||
It "BlockGoogleUpdate firewall rule exists" {
|
It "BlockGoogleUpdate firewall rule exists" {
|
||||||
|
|||||||
Reference in New Issue
Block a user