fix var name and better format log

This commit is contained in:
2022-10-24 14:35:12 -04:00
parent 77aff2293a
commit e84adf9182
+3 -3
View File
@@ -40,8 +40,8 @@ Foreach ( $reg in $UNINSTALL_KEYS ) {
## Uninstall the app
If ( $PRODUCT_CODE ) {
LogMsg "Uninstalling ${DISPLAY_NAME} ${PRODUCT_CODE}"
$args = '/X{' + $PRODUCT_CODE + '} /qn /norestart'
Try { Start-Process -FilePath "msiexec.exe" -ArgumentList $args -Wait }
$arguments = '/X{' + $PRODUCT_CODE + '} /qn /norestart'
Try { Start-Process -FilePath "msiexec.exe" -ArgumentList $arguments -Wait }
Catch { LogErr $_.Exception.Message }
If ( $INSTALL_LOCATION ) {
@@ -54,7 +54,7 @@ Foreach ( $reg in $UNINSTALL_KEYS ) {
}
}
Else {
LogMsg "`nFound ${DISPLAY_NAME}, but it cannot be uninstalled by this script`nUninstallString: ${UNINSTALLSTRING}`n"
LogMsg "Cannot uninstall ""${DISPLAY_NAME}""`n UninstallString: ${UNINSTALLSTRING}"
}
}
}