Fix install script sometimes uninstalling PTB version

This commit is contained in:
crschnick 2024-03-04 20:09:12 +00:00
parent ee3f5babe6
commit 73efb183e7

View file

@ -106,7 +106,7 @@ function Uninstall {
Write-Host "Looking for previous $ProductName installations ..." Write-Host "Looking for previous $ProductName installations ..."
$cim = Get-CimInstance Win32_Product | Where {$_.Name -match "$ProductName" } | Select-Object -First 1 $cim = Get-CimInstance Win32_Product | Where {$_.Name -eq "$ProductName" } | Select-Object -First 1
if ($cim) { if ($cim) {
$message = @( $message = @(
"Uninstalling existing $ProductName $($cim.Version) installation ..." "Uninstalling existing $ProductName $($cim.Version) installation ..."