From 3c4dee6149a4c657fc2e05257dec7af7733ccbb7 Mon Sep 17 00:00:00 2001 From: Uwe Date: Mon, 5 Dec 2022 02:06:46 +0100 Subject: [PATCH] [Win installer] some uninstaller improvements - remove two registry path deletions that were never performed since the paths do not exist - remove registry key that stores the main window parameters (size and position) when the option to remove also the user settings is on (because this affects all FreeCAD installations) - also change a name to uppercase (does not matter but Win 10 uses uppercase, so we should do the same to avoid confusions) --- src/WindowsInstaller/include/declarations.nsh | 2 +- src/WindowsInstaller/setup/uninstall.nsh | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/WindowsInstaller/include/declarations.nsh b/src/WindowsInstaller/include/declarations.nsh index f790786d90..dfc96e540d 100644 --- a/src/WindowsInstaller/include/declarations.nsh +++ b/src/WindowsInstaller/include/declarations.nsh @@ -35,7 +35,7 @@ Configuration and variables of FreeCAD installer !define APP_RUN "bin\${APP_NAME}.exe" !define BIN_FREECAD "${APP_NAME}.exe" -!define APP_REGKEY "Software\${APP_NAME}${APP_SERIES_KEY}" # like "FreeCAD0180" +!define APP_REGKEY "SOFTWARE\${APP_NAME}${APP_SERIES_KEY}" # like "FreeCAD0180" !define APP_REGKEY_SETUP "${APP_REGKEY}\Setup" !define APP_REGKEY_SETTINGS "${APP_REGKEY}\Settings" diff --git a/src/WindowsInstaller/setup/uninstall.nsh b/src/WindowsInstaller/setup/uninstall.nsh index 7ad81ff61c..8db49a1999 100644 --- a/src/WindowsInstaller/setup/uninstall.nsh +++ b/src/WindowsInstaller/setup/uninstall.nsh @@ -67,9 +67,8 @@ Section "un.FreeCAD" un.SecUnProgramFiles DeleteRegKey SHELL_CONTEXT "Software\Classes\${APP_EXT}" ${EndIf} - # clean other registry entries + # clean other registry entry DeleteRegKey SHCTX "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\${APP_NAME}.exe" - DeleteRegKey SHCTX "SOFTWARE\${APP_REGKEY}" # Eventually refresh shell icons ${RefreshShellIcons} @@ -86,9 +85,9 @@ Section /o "un.$(UnFreeCADPreferencesTitle)" un.SecUnPreferences # remove FreeCAD's config files StrCpy $AppSubfolder ${APP_DIR_USERDATA} Call un.DelAppPathSub # function from Utils.nsh + # remove the registry key that stores the main window parameters + DeleteRegKey HKCU "SOFTWARE\${APP_NAME}" NotPreferences: - # remove registry settings - DeleteRegKey HKCU "Software\${APP_NAME}\${APP_NAME}${APP_SERIES_NAME}" SectionEnd