fix var name and better format log
This commit is contained in:
+3
-3
@@ -40,8 +40,8 @@ Foreach ( $reg in $UNINSTALL_KEYS ) {
|
|||||||
## Uninstall the app
|
## Uninstall the app
|
||||||
If ( $PRODUCT_CODE ) {
|
If ( $PRODUCT_CODE ) {
|
||||||
LogMsg "Uninstalling ${DISPLAY_NAME} ${PRODUCT_CODE}"
|
LogMsg "Uninstalling ${DISPLAY_NAME} ${PRODUCT_CODE}"
|
||||||
$args = '/X{' + $PRODUCT_CODE + '} /qn /norestart'
|
$arguments = '/X{' + $PRODUCT_CODE + '} /qn /norestart'
|
||||||
Try { Start-Process -FilePath "msiexec.exe" -ArgumentList $args -Wait }
|
Try { Start-Process -FilePath "msiexec.exe" -ArgumentList $arguments -Wait }
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
If ( $INSTALL_LOCATION ) {
|
If ( $INSTALL_LOCATION ) {
|
||||||
@@ -54,7 +54,7 @@ Foreach ( $reg in $UNINSTALL_KEYS ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Else {
|
Else {
|
||||||
LogMsg "`nFound ${DISPLAY_NAME}, but it cannot be uninstalled by this script`nUninstallString: ${UNINSTALLSTRING}`n"
|
LogMsg "Cannot uninstall ""${DISPLAY_NAME}""`n UninstallString: ${UNINSTALLSTRING}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user