From b4a7d1cefe2b4e72986079211e9d62ce5a472bd8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Wed, 28 Jan 2026 01:29:25 +0200 Subject: #5335 Fix silent uninstall asking about registry --- .../installers/windows/installer_template.nsi | 33 ++++++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 0e36698018..ae40e8830f 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -767,8 +767,21 @@ Function un.UserSettingsFiles StrCmp $DO_UNINSTALL_V2 "true" Keep # Don't remove user's settings files on auto upgrade -# Ask if user wants to keep data files or not -MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep +ClearErrors +Push $0 +${GetParameters} $COMMANDLINE +${GetOptionsS} $COMMANDLINE "/clrusrfiles" $0 +# GetOptionsS returns an error if option does not exist, jump past Goto. +IfErrors +3 0 + Pop $0 + Goto Remove + +Pop $0 +ClearErrors + +ifSilent Keep 0 + # Ask if user wants to keep data files or not + MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep Remove: Push $0 @@ -864,11 +877,25 @@ RMDir "$INSTDIR" IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER FOLDERFOUND: +ifSilent NOFOLDER 0 MessageBox MB_OK $(DeleteProgramFilesMB) /SD IDOK IDOK NOFOLDER NOFOLDER: -MessageBox MB_YESNO $(DeleteRegistryKeysMB) IDYES DeleteKeys IDNO NoDelete +ClearErrors +Push $0 +${GetParameters} $COMMANDLINE +${GetOptionsS} $COMMANDLINE "/clearreg" $0 +# GetOptionsS returns an error if option does not exist, jump past Goto. +IfErrors +3 0 + Pop $0 + Goto DeleteKeys + +Pop $0 +ClearErrors + +ifSilent NoDelete 0 + MessageBox MB_YESNO $(DeleteRegistryKeysMB) IDYES DeleteKeys IDNO NoDelete DeleteKeys: DeleteRegKey SHELL_CONTEXT "SOFTWARE\Classes\x-grid-location-info" -- cgit v1.3