From 7b77fc85d9bb9805265071d2ee467bf90fc19592 Mon Sep 17 00:00:00 2001 From: David Yoder Date: Wed, 1 Nov 2023 13:37:57 -0400 Subject: [PATCH] small fix to make usable again --- Tools.ps1 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Tools.ps1 b/Tools.ps1 index f98a3b9..25b5a6a 100644 --- a/Tools.ps1 +++ b/Tools.ps1 @@ -933,18 +933,24 @@ Function Uninstall-MSI { } Else { $MSI = $false } # Get a usable name for the entry - If ( $REG_PROPERTY.DisplayName) + If ( ![string]::IsNullOrEmpty($REG_PROPERTY.DisplayName) ) { + $AppName = $REG_PROPERTY.DisplayName + } ElseIf ( ![string]::IsNullOrEmpty($REG_PROPERTY.Name) ) { + $AppName = $REG_PROPERTY.DisplayName + } Else { + $AppName = '[unknown]' + } $customObject = [PSCustomObject]@{ MSI = $MSI - DisplayName = $REG_PROPERTY.DisplayName + DisplayName = $AppName UninstallString = $REG_PROPERTY.UninstallString ModifyPath = $REG_PROPERTY.ModifyPath ProductCode = $PRODUCT_CODE } # Cleanup object properties - If ( $customObject.) + #If ( $customObject.) $INSTALLED_APPS += $customObject