|
|
@ -10219,6 +10219,9 @@ function UninstallPCHealthCheck |
|
|
|
foreach ($MSI in @(Get-ChildItem -Path "$env:SystemRoot\Installer" -Filter *.msi -File -Force)) |
|
|
|
{ |
|
|
|
$Name = $Files.Keys | Where-Object -FilterScript {$_ -eq $MSI.Name} |
|
|
|
# Check if necessary files exist in folder unless we get a bunch of errors for $File variable |
|
|
|
if ($Name) |
|
|
|
{ |
|
|
|
$File = $Files[$Name] |
|
|
|
|
|
|
|
# https://learn.microsoft.com/en-us/previous-versions/tn-archive/ee176615(v=technet.10) |
|
|
@ -10229,6 +10232,7 @@ function UninstallPCHealthCheck |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
# Prevent the "PC Health Check" app from installing in the future |
|
|
|
if (-not (Test-Path -Path HKLM:\SOFTWARE\Microsoft\PCHC)) |
|
|
|