minor changes
This commit is contained in:
@@ -910,7 +910,7 @@ Function Test-Uninstall-MSI {
|
|||||||
# Exit if we can't find any software at all
|
# Exit if we can't find any software at all
|
||||||
If ( $UNINSTALL_KEYS.Length -eq 0 ) { Write-Error "Could not find any installed apps in the Windows Registry" ; Return }
|
If ( $UNINSTALL_KEYS.Length -eq 0 ) { Write-Error "Could not find any installed apps in the Windows Registry" ; Return }
|
||||||
|
|
||||||
# Array to store custom objects about each installed MSI app
|
# Array to store custom objects about each installed MSI app
|
||||||
$INSTALLED_APPS = @()
|
$INSTALLED_APPS = @()
|
||||||
|
|
||||||
Foreach ( $reg in $UNINSTALL_KEYS ) {
|
Foreach ( $reg in $UNINSTALL_KEYS ) {
|
||||||
@@ -925,7 +925,7 @@ Function Test-Uninstall-MSI {
|
|||||||
|
|
||||||
$MSI = $true
|
$MSI = $true
|
||||||
|
|
||||||
# Get the product code from the UninstallString or ModifyPath if the app is installed via MSI
|
# Get the product code from the UninstallString
|
||||||
If ( ![string]::IsNullOrEmpty($REG_PROPERTY.UninstallString) ) { $PRODUCT_CODE = $(Get-GUIDFromMSIUninstallString -str $REG_PROPERTY.UninstallString) }
|
If ( ![string]::IsNullOrEmpty($REG_PROPERTY.UninstallString) ) { $PRODUCT_CODE = $(Get-GUIDFromMSIUninstallString -str $REG_PROPERTY.UninstallString) }
|
||||||
|
|
||||||
# Get the product code from the ModifyPath
|
# Get the product code from the ModifyPath
|
||||||
@@ -971,7 +971,7 @@ Function Test-Uninstall-MSI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Print out uninstall string for unsupported apps
|
# Print out uninstall string for unsupported apps
|
||||||
If ( ($uninstall) -and ($installed_app.UninstallSupported -eq $false) ) {
|
If ( ($uninstall) -and ($installed_app.MSI -eq $false) ) {
|
||||||
Write-Output "Cannot uninstall ""${DisplayName}""`n UninstallString: ${UninstallString}"
|
Write-Output "Cannot uninstall ""${DisplayName}""`n UninstallString: ${UninstallString}"
|
||||||
$uninstall = $false
|
$uninstall = $false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user