summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2025-04-30 09:54:44 +0200
committerSebastian Holmin <sebastian.holmin@mullvad.net>2025-05-28 13:25:32 +0200
commit3a37fd2f2abdf6a97823db1adc7667dd020a627d (patch)
tree52901c11857eeb0b818854d8c0c9e1c22684585d
parent8c10079a8c9817f6bc618b59126c7ec4d3e17ad1 (diff)
downloadmullvadvpn-3a37fd2f2abdf6a97823db1adc7667dd020a627d.tar.xz
mullvadvpn-3a37fd2f2abdf6a97823db1adc7667dd020a627d.zip
Show appropriate message if in-app upgrade fails on Windows
-rw-r--r--dist-assets/windows/installer.nsh23
1 files changed, 22 insertions, 1 deletions
diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh
index 9e0a2dfaf7..d9e9fc63af 100644
--- a/dist-assets/windows/installer.nsh
+++ b/dist-assets/windows/installer.nsh
@@ -890,7 +890,28 @@
${ExtractMullvadSetup}
${ClearFirewallRules}
- MessageBox MB_OK "Failed to uninstall a previous version. Please try restarting your computer and try again. If you still have this issue, please contact support."
+ # Give the user some helpful instructions about how to proceed
+ Push $0
+
+ ${GetParameters} $0
+ ${GetOptions} $0 "/inapp" $1
+ ${If} ${Errors}
+ Push 0
+ ${Else}
+ Push 1
+ ${EndIf}
+
+ Pop $0
+
+ # Show appropriate message about failed update depending on whether /inapp is specified
+ ${If} $0 == 1
+ MessageBox MB_OK "The update could not be installed and the previous version is missing. Please download the app again from mullvad.net/download and reinstall. If that fails, please try restarting your computer and try again."
+ ${Else}
+ MessageBox MB_OK "Failed to uninstall a previous version. Please try restarting your computer and try again. If you still have this issue, please contact support."
+ ${EndIf}
+
+ Pop $0
+
SetErrorLevel 5
Abort