From 614cd7d676e04b801c380574f66be9570358cc63 Mon Sep 17 00:00:00 2001 From: Juho Heikka Date: Fri, 30 Sep 2022 13:26:13 +0300 Subject: [PATCH] Delete old extensions on Windows update Signed-off-by: Juho Heikka --- build/installer.nsh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/installer.nsh b/build/installer.nsh index 8ff35b5e4f..e4b8ea5189 100644 --- a/build/installer.nsh +++ b/build/installer.nsh @@ -1,4 +1,11 @@ !macro customInit + ; Make sure all old extensions are removed + RMDir /r "$INSTDIR\resources\extensions" + ; Workaround for old node_modules having already duplicate extensions + RMDir /r "$APPDATA\${APP_FILENAME}\node_modules\lens-license" + RMDir /r "$APPDATA\${APP_FILENAME}\node_modules\lens-survey" + RMDir /r "$APPDATA\${APP_FILENAME}\node_modules\lens-telemetry" + ; Workaround for installer handing when the app directory is removed manually ${ifNot} ${FileExists} "$INSTDIR" DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\{${UNINSTALL_APP_KEY}}"