aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/nsis
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-12-18 12:47:33 -0800
committerAnders Broman <a.broman58@gmail.com>2018-12-19 04:50:21 +0000
commit54711eeac7c20536373a80aa4e3684498e090033 (patch)
treef40aa9c299948b74c894337c7965f1c872d98b19 /packaging/nsis
parent94bc8f127682a5207dfcbb60e7e2011547412392 (diff)
NSIS: Expand our vcredist exit code check.
Along with checking for exit code 3010 (reboot required), check for other errors and show a warning as needed. Add a note about the Universal CRT to the User's Guide. Bug: 15358 Change-Id: Ia49dbdc66edc8ea68f957ec353f1115536002d13 Reviewed-on: https://code.wireshark.org/review/31100 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'packaging/nsis')
-rw-r--r--packaging/nsis/wireshark.nsi22
1 files changed, 18 insertions, 4 deletions
diff --git a/packaging/nsis/wireshark.nsi b/packaging/nsis/wireshark.nsi
index c3dacb88c5..f1720ba99d 100644
--- a/packaging/nsis/wireshark.nsi
+++ b/packaging/nsis/wireshark.nsi
@@ -515,10 +515,24 @@ File "${VCREDIST_EXE}"
; http://asawicki.info/news_1597_installing_visual_c_redistributable_package_from_command_line.html
ExecWait '"$INSTDIR\vcredist_${TARGET_MACHINE}.exe" /install /quiet /norestart' $0
DetailPrint "vcredist_${TARGET_MACHINE} returned $0"
-IntCmp $0 3010 redistReboot redistNoReboot
-redistReboot:
-SetRebootFlag true
-redistNoReboot:
+
+; https://docs.microsoft.com/en-us/windows/desktop/Msi/error-codes
+!define ERROR_SUCCESS 0
+!define ERROR_SUCCESS_REBOOT_INITIATED 1641
+!define ERROR_SUCCESS_REBOOT_REQUIRED 3010
+${Switch} $0
+ ${Case} ${ERROR_SUCCESS}
+ ${Break}
+ ${Case} ${ERROR_SUCCESS_REBOOT_INITIATED} ; Shouldn't happen.
+ ${Case} ${ERROR_SUCCESS_REBOOT_REQUIRED}
+ SetRebootFlag true
+ ${Break}
+ ${Default}
+ MessageBox MB_OK "The Visual C++ Redistributable installer failed with error $0.$\nPlease make sure you have KB2999226 or KB3118401 installed.$\nUnable to continue installation." /SD IDOK
+ Abort
+ ${Break}
+${EndSwitch}
+
Delete "$INSTDIR\vcredist_${TARGET_MACHINE}.exe"