-
Notifications
You must be signed in to change notification settings - Fork 634
Add UsePreviousSetupType to Setup section to preserve settings during upgrade #641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… upgrade The intend here is to resolve the issue when settings are not carried over when upgrading in silent mode - the most visible were the Windows Integration to me but it can impact other settings as well. After reviewing documentation, I found out that UsePreviousSetupType directive should handle it, but was missing from the installer script. As per documentation: When this directive is yes, the default, at startup Setup will look in the registry to see if the same application is already installed, and if so, it will use the setup type and component settings of the previous installation as the default settings presented to the user in the wizard. Note that Setup cannot re-use settings from a previous installation that had Uninstallable set to no, since the registry entries it looks for are not created when Uninstallable is no. -- end of documentation. As discussed on my previous attempt, here is the new one trying to account for the proper way to carry over any and all settings, even future one. Signed-off-by: Nicolas DENIS <the.clickman@gmail.com>
|
Confirming success. After running the installer from the generated artifact, let it uninstall and reinstall it, Windows Integration was preserved. content of registry key Also checked if you run the installer manually without option go to the page to select option, it default properly to the same settings from previous version. (in my case, both Windows Integration is automatically checked) |
dscho
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rimrul what's your take on this? I cannot really wrap my head around the risk side of this PR... especially this close to v2.51.0(2)...
|
UsePreviousSetupType defaults to yes, so just adding a line saying UsePreviousSetupType=yes like this PR seems to do makes no difference. Also the comment about uninstall and reinstall is confusing. If you uninstall all storage of previous settings is lost. Perhaps I am misunderstanding things. |
|
hi, I agree... that maybe unnecessary. (But sometimes, setting default value explicitely make sure behavior do not change). But I digress. The issue ultimately lie in the way the setup of GIT is declared as part of winget - I did try again, but in vesbose mode to try to determine what winget is actually doing. 2025-09-26 19:53:52.659 [CLI ] Starting: 'C:\Users\Nicolas\AppData\Local\Temp\WinGet\Git.Git.2.51.0\Git-2.51.0-64-bit.exe' with arguments '/SP- /SILENT /SUPPRESSMSGBOXES /NORESTART /LOG="C:\Users\Nicolas\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-Git.Git.2.51.0-2025-09-26-19-53-52.659.log" /COMPONENTS=icons,ext,gitlfs,assoc,assoc_sh,consolefont,windowsterminal,scalar' With hardcoded components. That is why winget is killing my config everytime, as it force the settings it use. Would it be possible to remove that from the manifest used when you submit the update to Microsoft ? You can keep or kill the PR as you see fit - defaulting to the default won't hurt anyway - but only asking to get the winget declaration to be improved (I could not find it in the repo to suggest an update to it) |
We don't maintain that winget definition. That's an unofficial, unsupported way to install Git for Windows. |
|
any idea who is maintaining it ? cannot say from the Microsoft winget repo as it come from a bot. |
Defaulting to the default does cause head-scratching all the time, so I'll just close it. Thank you all for working together to help me understand the underlying issues (and the InnoSetup defaults)! |
|
so far it is going to be fixed in the 2.51.0.2 winget deployment |
The intend here is to resolve the issue when settings are not carried over when upgrading in silent mode - the most visible were the Windows Integration to me but it can impact other settings as well.
After reviewing documentation, I found out that UsePreviousSetupType directive should handle it, but was missing from the installer script.
As per documentation:
When this directive is yes, the default, at startup Setup will look in the registry to see if the same application is already installed, and if so, it will use the setup type and component settings of the previous installation as the default settings presented to the user in the wizard. Note that Setup cannot re-use settings from a previous installation that had Uninstallable set to no, since the registry entries it looks for are not created when Uninstallable is no. -- end of documentation.
As discussed on my previous attempt, here is the new one trying to account for the proper way to carry over any and all settings, even future one.
Signed-off-by: Nicolas DENIS the.clickman@gmail.com