From 9aa3946c06023a88581d10e85fcfc3c6caf0edef Mon Sep 17 00:00:00 2001 From: David Yoder Date: Thu, 4 Jan 2024 09:26:05 -0500 Subject: [PATCH] don't print out empty items --- Tools.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tools.ps1 b/Tools.ps1 index c193269..f42b92c 100644 --- a/Tools.ps1 +++ b/Tools.ps1 @@ -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 }