Improve installation error handling

This commit is contained in:
crschnick 2024-11-19 16:13:50 +00:00
parent 9403ebf204
commit 9f08b82e7d

View file

@ -113,6 +113,10 @@ function Uninstall {
) -join [Environment]::NewLine
Write-Host $message
$cimResult = Invoke-CimMethod -InputObject $cim -Name Uninstall
if ($cimResult.ReturnValue) {
Write-Host "Uninstallation failed: Code $($cimResult.ReturnValue)"
exit
}
}
}