summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOdd Stranne <odd@mullvad.net>2021-01-28 16:18:11 +0100
committerOdd Stranne <odd@mullvad.net>2021-07-02 16:31:31 +0200
commit25bb2de9c16d88fd766c7546fc5fb0ba036f5a05 (patch)
tree13a22acab97121121745094e0055e2604ece5a4a
parentcb5330bbeef83931310111fad630f64207932f25 (diff)
downloadmullvadvpn-25bb2de9c16d88fd766c7546fc5fb0ba036f5a05.tar.xz
mullvadvpn-25bb2de9c16d88fd766c7546fc5fb0ba036f5a05.zip
Improve error handling when registering service
-rw-r--r--dist-assets/windows/installer.nsh12
1 files changed, 12 insertions, 0 deletions
diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh
index 0aa6abcbdd..5f0151f009 100644
--- a/dist-assets/windows/installer.nsh
+++ b/dist-assets/windows/installer.nsh
@@ -282,6 +282,18 @@
StrCpy $R0 "Failed to install Mullvad service"
log::LogWithDetails $R0 $1
+ #
+ # NSIS documentation indicates that failure to launch the target will return
+ # the string "error" on the top of the stack ($0 after we pop).
+ #
+ # However in practice, the failure code from CreateProcess is used.
+ # And naturally, comparing to 0xC0000139 fails because... NSIS
+ #
+ ${If} $0 == -1073741511
+ log::Log "Failed to launch $\"mullvad-daemon$\" (API issue)"
+ Goto InstallService_return
+ ${EndIf}
+
Goto InstallService_return
${EndIf}