Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ada68d37f | ||
|
|
933105f0bf |
@@ -10,7 +10,7 @@ If ( IsAdmin )
|
|||||||
If ( IsURLValid $URL )
|
If ( IsURLValid $URL )
|
||||||
{
|
{
|
||||||
# Uninstall all versions of SketchUp
|
# Uninstall all versions of SketchUp
|
||||||
$APP_NAME = "SketchUp"
|
$APP_NAME = "SketchUp*"
|
||||||
Run-Script -LivePSScript Uninstall-MSI
|
Run-Script -LivePSScript Uninstall-MSI
|
||||||
|
|
||||||
# Set the local file name to download to
|
# Set the local file name to download to
|
||||||
|
|||||||
+5
-1
@@ -24,6 +24,9 @@ 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 = 0
|
||||||
|
|
||||||
# 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
|
||||||
@@ -38,7 +41,7 @@ Foreach ( $reg in $UNINSTALL_KEYS ) {
|
|||||||
If ( $PRODUCT_CODE ) {
|
If ( $PRODUCT_CODE ) {
|
||||||
LogMsg "Uninstalling ${DISPLAY_NAME} ${PRODUCT_CODE}"
|
LogMsg "Uninstalling ${DISPLAY_NAME} ${PRODUCT_CODE}"
|
||||||
$arguments = '/X{' + $PRODUCT_CODE + '} /qn /norestart'
|
$arguments = '/X{' + $PRODUCT_CODE + '} /qn /norestart'
|
||||||
Try { Start-Process -FilePath "msiexec.exe" -ArgumentList $arguments -Wait }
|
Try { Start-Process -FilePath "msiexec.exe" -ArgumentList $arguments -Wait ; $PRODUCTUNINSTALLED++ }
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,4 +49,5 @@ Foreach ( $reg in $UNINSTALL_KEYS ) {
|
|||||||
LogMsg "Cannot uninstall ""${DISPLAY_NAME}""`n UninstallString: ${UNINSTALLSTRING}"
|
LogMsg "Cannot uninstall ""${DISPLAY_NAME}""`n UninstallString: ${UNINSTALLSTRING}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
If ( $PRODUCTUNINSTALLED -gt 0 ) { LogMsg "No product matching ${APP_NAME} was found"}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user