summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2019-10-08 17:36:07 +0200
committerDavid Lönnhager <david.l@mullvad.net>2019-10-18 13:38:58 +0200
commit6d063dd619b6b9c609f0d1bc6343df43ba7b4e88 (patch)
tree8453876b3071a53e53022119848fd7358210fbdc
parentd86a380293c643ea22e94b7c26e7debe0c4068b8 (diff)
downloadmullvadvpn-6d063dd619b6b9c609f0d1bc6343df43ba7b4e88.tar.xz
mullvadvpn-6d063dd619b6b9c609f0d1bc6343df43ba7b4e88.zip
Remove TAP adapter when uninstalling on Windows
-rw-r--r--dist-assets/windows/installer.nsh18
1 files changed, 18 insertions, 0 deletions
diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh
index 6d43b4d000..081ce46807 100644
--- a/dist-assets/windows/installer.nsh
+++ b/dist-assets/windows/installer.nsh
@@ -151,6 +151,20 @@
!define ForceRenameAdapter '!insertmacro "ForceRenameAdapter"'
#
+# RemoveTap
+#
+# Remove Mullvad TAP adapter
+#
+!macro RemoveTap
+ nsExec::ExecToStack '"$TEMP\driver\tapinstall.exe" remove ${TAP_HARDWARE_ID}'
+
+ Pop $0
+ Pop $1
+!macroend
+
+!define RemoveTap '!insertmacro "RemoveTap"'
+
+#
# InstallDriver
#
# Install tunnel driver or update it if already present on the system
@@ -682,6 +696,10 @@
MessageBox MB_ICONQUESTION|MB_YESNO "Would you like to remove settings files as well?" IDNO customRemoveFiles_after_remove_settings
${RemoveSettings}
customRemoveFiles_after_remove_settings:
+
+ # Remove the TAP adapter
+ ${ExtractDriver}
+ ${RemoveTap}
${EndIf}
${RemoveCLIFromEnvironPath}