From 97f025c3435318999cb962e2e9ce2c75b5e9f092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Fri, 3 Oct 2025 17:57:47 +0200 Subject: [PATCH] [PM-2021] Remove startup entry on windows uninstall (#16701) --- apps/desktop/installer.nsh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/desktop/installer.nsh b/apps/desktop/installer.nsh index f8939423c8d..3fe8a69b089 100644 --- a/apps/desktop/installer.nsh +++ b/apps/desktop/installer.nsh @@ -7,3 +7,14 @@ ${endif} ${endif} !macroend + +# When the user is uninstalling the app, remove the auto-start registry entries +!macro customUnInstall + ${ifNot} ${isUpdated} + DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "electron.app.${PRODUCT_NAME}" + DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "electron.app.${PRODUCT_NAME}" + + DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run" "electron.app.${PRODUCT_NAME}" + DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run" "electron.app.${PRODUCT_NAME}" + ${endIf} +!macroend