place app tracking above loop
This commit is contained in:
+3
-3
@@ -11,6 +11,9 @@ Function Get-GUIDFromMSIUninstallString {
|
|||||||
Return $str.Substring($start, $end - $start)
|
Return $str.Substring($start, $end - $start)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Track whether an app was uninstalled or not
|
||||||
|
$PRODUCTUNINSTALLED = $false
|
||||||
|
|
||||||
Foreach ( $reg in $UNINSTALL_KEYS ) {
|
Foreach ( $reg in $UNINSTALL_KEYS ) {
|
||||||
# Get the uninstall key
|
# Get the uninstall key
|
||||||
$REG_PROPERTY = Get-ItemProperty -Path $reg.PSPath
|
$REG_PROPERTY = Get-ItemProperty -Path $reg.PSPath
|
||||||
@@ -24,9 +27,6 @@ Foreach ( $reg in $UNINSTALL_KEYS ) {
|
|||||||
# Get the ModifyPath
|
# Get the ModifyPath
|
||||||
$MODIFYPATH = $REG_PROPERTY.ModifyPath
|
$MODIFYPATH = $REG_PROPERTY.ModifyPath
|
||||||
|
|
||||||
# Track whether an app was uninstalled or not
|
|
||||||
$PRODUCTUNINSTALLED = $false
|
|
||||||
|
|
||||||
# Make sure the DisplayName matches what we're looking for
|
# Make sure the DisplayName matches what we're looking for
|
||||||
If ( $DISPLAY_NAME -ilike $APP_NAME ) {
|
If ( $DISPLAY_NAME -ilike $APP_NAME ) {
|
||||||
# Make sure the software was installed using an MSI
|
# Make sure the software was installed using an MSI
|
||||||
|
|||||||
Reference in New Issue
Block a user