small fix to make usable again

This commit is contained in:
2023-11-01 13:37:57 -04:00
parent 48c4abb60a
commit 7b77fc85d9
+9 -3
View File
@@ -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