KEMBAR78
Registry keys updated before portable installation was successful · Issue #5190 · microsoft/winget-cli · GitHub
Skip to content

Registry keys updated before portable installation was successful #5190

@mdanish-kh

Description

@mdanish-kh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIssue related to a PRIssue-BugIt either shouldn't be doing this or needs an investigation.PortableIssue related to portable package

    Type

    Projects

    Status

    Released

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions