summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2022-07-22 11:58:26 +0200
committerDavid Lönnhager <david.l@mullvad.net>2022-08-25 15:34:50 +0200
commitc6c6f477e6ffdf6e26957c94470677fc8419795b (patch)
treea72f5498cc5f82f9e0ff101f77fcb29f5e3c86f0
parentb301a5d64d863f28947a4c133fe152c70cabe088 (diff)
downloadmullvadvpn-c6c6f477e6ffdf6e26957c94470677fc8419795b.tar.xz
mullvadvpn-c6c6f477e6ffdf6e26957c94470677fc8419795b.zip
Improve robustness of driver uninstall
-rw-r--r--dist-assets/windows/installer.nsh21
1 files changed, 18 insertions, 3 deletions
diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh
index c02ade6ed5..444846a3a0 100644
--- a/dist-assets/windows/installer.nsh
+++ b/dist-assets/windows/installer.nsh
@@ -795,13 +795,19 @@
${ExtractDriverlogic}
${RemoveAbandonedWintunAdapter}
+
+ ${If} $R0 != 0
+ MessageBox MB_OK "$R0"
+ Goto customInstall_abort_installation
+ ${EndIf}
+
${RemoveSplitTunnelDriver}
${If} $R0 != 0
MessageBox MB_OK "$R0"
Goto customInstall_abort_installation
${EndIf}
-
+
${InstallService}
${If} $R0 != 0
@@ -1030,6 +1036,7 @@
Pop $Silent
+ ${ExtractDriverlogic}
${ExtractMullvadSetup}
${If} $Silent == 1
@@ -1076,6 +1083,16 @@
Goto customRemoveFiles_abort
${EndIf}
+ # Precaution: If the daemon fails to exit gracefully,
+ # attempt to remove the driver here. Otherwise, the
+ # installer may fail to delete the install dir.
+
+ ${RemoveSplitTunnelDriver}
+
+ ${If} $R0 != 0
+ Goto customRemoveFiles_abort
+ ${EndIf}
+
# Remove application files
log::Log "Deleting $INSTDIR"
RMDir /r $INSTDIR
@@ -1105,11 +1122,9 @@
${ClearFirewallRules}
${RemoveCurrentDevice}
- ${ExtractDriverlogic}
${ExtractWireGuard}
${RemoveWintun}
${RemoveWireGuardNt}
- ${RemoveSplitTunnelDriver}
log::SetLogTarget ${LOG_VOID}