Skip to content
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

Registry keys updated before portable installation was successful #5190

Open
mdanish-kh opened this issue Feb 7, 2025 · 0 comments · May be fixed by #5214
Open

Registry keys updated before portable installation was successful #5190

mdanish-kh opened this issue Feb 7, 2025 · 0 comments · May be fixed by #5214
Labels
In-PR Issue related to a PR Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package

Comments

@mdanish-kh
Copy link
Contributor

mdanish-kh commented Feb 7, 2025

Brief description of your issue

I was trying to upgrade ZoomIt on my device (Portable ZIP installer type). The installation failed because zoomit was already running and I got an Access Denied error

 ~ winget list zoomit
Name   Id                            Version Available Source
-------------------------------------------------------------
ZoomIt Microsoft.Sysinternals.ZoomIt 8.01    9         winget
 ~ winget upgrade Microsoft.Sysinternals.ZoomIt
Found ZoomIt [Microsoft.Sysinternals.ZoomIt] Version 9.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://download.sysinternals.com/files/ZoomIt.zip
  ██████████████████████████████  1.42 MB / 1.42 MB
Successfully verified installer hash
Extracting archive...
Successfully extracted archive
Starting package install...
An unexpected error occurred while executing the command:
remove: Access is denied.: "C:\Users\<USER>\AppData\Local\Microsoft\WinGet\Packages\Microsoft.Sysinternals.ZoomIt_Microsoft.Winget.Source_8wekyb3d8bbwe\ZoomIt64.exe"
Installer failed with exit code: 0x8a150003 : Executing command failed

Although the installation failed, the registry entries specifically DisplayVersion was updated erroneously. This causes WinGet to believe that I'm on the latest version when I'm not

 ~ winget upgrade Microsoft.Sysinternals.ZoomIt
No available upgrade found.
No newer package versions are available from the configured sources.
 ~ winget list zoomit
Name   Id                            Version Source
----------------------------------------------------
ZoomIt Microsoft.Sysinternals.ZoomIt 9.0     winget

Steps to reproduce

  1. Install a portable / ZIP portable (i.e., WinGet is acting as the logical installer & responsible for ARP entries)
  2. Installation fails

Expected behavior

Updating registry entries should be transaction based i.e., if the installation fails they should be rolled back to previous values. Or they should be updated only when the installation is reported to be successful

Actual behavior

DisplayVersion updated even though the package was not updated

Image

Image

Logs

Generated logs by manually changing DisplayVersion and then trying the upgrade command again

WinGet-2025-02-07-14-55-31.718.log

Environment

Windows Package Manager v1.9.25200
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.4751
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Enabled
BypassCertificatePinningForMicrosoftStore Enabled
InstallerHashOverride                     Enabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled
@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Triage Issue need to be triaged Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package and removed Needs-Triage Issue need to be triaged labels Feb 7, 2025
@mdanish-kh mdanish-kh changed the title Registry keys updated before ZIP installation was successful Registry keys updated before portable installation was successful Feb 10, 2025
@Trenly Trenly linked a pull request Feb 17, 2025 that will close this issue
2 tasks
@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR Issue related to a PR label Feb 17, 2025
@denelon denelon added this to WinGet Feb 18, 2025
@denelon denelon moved this to In Progress in WinGet Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In-PR Issue related to a PR Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

1 participant