summaryrefslogtreecommitdiffhomepage
path: root/dist-assets
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2022-11-15 14:22:57 +0100
committerDavid Lönnhager <david.l@mullvad.net>2022-11-17 10:38:00 +0100
commit56e052de0d7d0bd0c8edb8cb4cccea2f0e3ff4ba (patch)
tree59ba895442865b1b871dea335eae9c3eb137552c /dist-assets
parent3e9a75b8f06c3293a48b8aff95ac90c1bd3a814e (diff)
downloadmullvadvpn-56e052de0d7d0bd0c8edb8cb4cccea2f0e3ff4ba.tar.xz
mullvadvpn-56e052de0d7d0bd0c8edb8cb4cccea2f0e3ff4ba.zip
Removing settings when silently uninstalling the app on Windows, unless
upgrading
Diffstat (limited to 'dist-assets')
-rw-r--r--dist-assets/windows/installer.nsh11
1 files changed, 7 insertions, 4 deletions
diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh
index 2e1f253189..d9a7d5583e 100644
--- a/dist-assets/windows/installer.nsh
+++ b/dist-assets/windows/installer.nsh
@@ -1030,7 +1030,7 @@
${ExtractDriverlogic}
${ExtractMullvadSetup}
- ${If} $Silent == 1
+ ${If} ${isUpdated}
ReadRegStr $NewVersion HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APP_GUID}" "NewVersion"
nsExec::ExecToStack '"$PLUGINSDIR\mullvad-setup.exe" is-older-version $0'
@@ -1122,10 +1122,13 @@
${RemoveLogsAndCache}
${If} $Silent != 1
MessageBox MB_ICONQUESTION|MB_YESNO "Would you like to remove settings files as well?" IDNO customRemoveFiles_after_remove_settings
- ${RemoveSettings}
-
- DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "net.mullvad.vpn"
+ ${ElseIf} ${isUpdated}
+ Goto customRemoveFiles_after_remove_settings
${EndIf}
+
+ ${RemoveSettings}
+ DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "net.mullvad.vpn"
+
customRemoveFiles_after_remove_settings:
${Else}
log::SetLogTarget ${LOG_VOID}