-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
winget upgrade does not respect the scope used on installation #5099
Comments
Updating with the First installation
After updating
|
@litmowise that's a side effect of the issue described above. |
@JanDeDobbeleer Thank you, I know. |
This is a known issue with MSI / WiX installers where they would put uninstall entries in |
I was actually going to make an issue for this @denelon as I have this issue described with oh-my-posh as well as with other installations. I've been waiting until I had an example where I could submit to the Feedback Hub. However, this might extend further into an issue of Winget not respecting paths and custom install locations, even sometimes failing to install into a custom directory using winget commands as it will just default back the installers preferred default location. Will try and get an example soon! |
@mdanish-kh is there anything I can change to the installer to force the identification? |
Unfortunately, I don't think there's much you can do if you want to include both scopes in the manifest, unless you can tweak the user-scoped MSI installer to put the uninstall entries to Alternatives
|
#3011 (comment) or https://stackoverflow.com/questions/32273217/how-and-why-installation-per-user-manages-to-write-to-hklm may offer some more hints |
I should also mention that here you'll have to explicitly target the user scope installer, as by default WinGet will assume the current installation is so: |
@mdanish-kh shouldn't that also work without the |
Brief description of your issue
When using winget install in a non-elevated terminal, the installation is done with
scope: user
. However, when using upgrade immediately after in the same terminal window, the scope is identified assystem
.Steps to reproduce
Install v27.17.0
Upgrade to latest
Expected behavior
It should also identify
Installer [Arm64,msi,User,] is current best choice
on upgrade.Actual behavior
It identifies
Installer [Arm64,msi,Machine,] is current best choice
.Full logs below.
WinGet-2024-12-28-17-26-54.424.log
WinGet-2024-12-28-17-24-39.755.log
Environment
The text was updated successfully, but these errors were encountered: