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