don't print out empty items

This commit is contained in:
2024-01-04 09:26:05 -05:00
parent 9153541837
commit 9aa3946c06
+4
View File
@@ -962,6 +962,10 @@ Function Uninstall-MSI {
# Print out uninstall string for unsupported apps
If ( ($uninstall) -and ($installed_app.MSI -eq $false) ) {
# Skip apps that have no display name or uninstall string
If ( ([string]::IsNullOrEmpty($DisplayName)) -and ([string]::IsNullOrEmpty($UninstallString)) ) { $uninstall = $false ; Continue }
Write-Output "Cannot uninstall ""${DisplayName}""`n UninstallString: ${UninstallString}"
$uninstall = $false
}