Skip to content

[Sandbox Test]: WinGet failed to download installer file with proper name #6121

Closed

Description

Relevant area(s)

WinGet CLI

Relevant command(s)

winget install

Brief description of your issue

In a Windows Sandbox instance launched by SandboxTest.ps1, the winget.exe failed to download installer file with proper name.

Manually check $env:TEMP\WinGet\<package_identifier_and_version>\ folder, the installer file was named with its SHA256 value WITHOUT PROPER FILE EXTENSION. This caused the downloaded installer file cache unable to be found by following steps. The package can't be successfully installed.

Steps to reproduce

  1. Make sure you've cloned microsoft/winget-pkgs and checked out the latest master branch.
  2. Try Tools/SandboxTest.ps1 <any local manifest folder> to install a local manifest inside Sandbox instance.

Expected behavior

The package should be installed as expected. For portable executables, the downloaded package should be automatically added to $env:PATH and an ARP Entry should be written into the Windows Registry.

Actual behavior

The inferred installer file will be shown as downloaded and hash value verified.

But NO ARP ENTRIES will be shown, EVEN IF it's a portable executable (ARP Entries should be written by winget.exe itself).

Environment

Windows 程序包管理器(预览) v1.29.50-preview
版权所有 (C) Microsoft Corporation。保留所有权利。

Windows: Windows.Desktop v10.0.26100.8117
系统体系结构: X64
软件包: Microsoft.DesktopAppInstaller v1.29.50.0

Winget 目录
-------------------------------------------------------------------------------------------------------------------
日志                   %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
用户设置               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
可移植链接目录(用户)   %LOCALAPPDATA%\Microsoft\WinGet\Links
可移植链接目录(计算机) C:\Program Files\WinGet\Links
可移植包根目录(用户)   %LOCALAPPDATA%\Microsoft\WinGet\Packages
可移植包根目录         C:\Program Files\WinGet\Packages
可移植包根目录 (x86)   C:\Program Files (x86)\WinGet\Packages
安装程序下载           %USERPROFILE%\Downloads
配置模块               %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules

链接
----------------------------------------------------------------------------
隐私声明             https://aka.ms/winget-privacy
许可协议             https://aka.ms/winget-license
第三方声明           https://aka.ms/winget-3rdPartyNotice
主页                 https://aka.ms/winget
Windows 应用商店条款 https://www.microsoft.com/en-us/storedocs/terms-of-sale

管理员设置                                状态
------------------------------------------------
LocalManifestFiles                        已启用
BypassCertificatePinningForMicrosoftStore 已禁用
InstallerHashOverride                     已禁用
LocalArchiveMalwareScanOverride           已启用
ProxyCommandLineOptions                   已禁用
DefaultProxy                              已禁用

Activity

  1. added
    Issue-Bug
    Needs-Triage
    on Apr 1, 2026
  2. Dragon1573 commented on Apr 2, 2026

    @Dragon1573
    Author

    Important

    It seems this issue only happens when invoking winget.exe -m <local_manifest_folder>.

    When using winget.exe upgrade or winget install with remote sources (mostly winget), no errors occur.

  3. Dragon1573 commented on Apr 2, 2026

    @Dragon1573
    Author
    Test with local manifests

    Image Image Image

    Test with winget remote source

    Image Image Image

  4. Dragon1573 commented on Apr 3, 2026

    @Dragon1573
    Author
    Image Image

    All latest 5 versions of winget.exe failed to install local manifests. Can't sure if it's a severe bug of Windows Sandbox instance only.

  5. Dragon1573 commented on Apr 3, 2026

    @Dragon1573
    Author
    Image

    On Windows 11 Pro WorkStation host device, the latest pre-release version v1.29.50-preview also failed to install package properly.

    CC JohnMcPMS Kaleb Luedtke (@Trenly) Demitrius Nelon (@denelon) Muhammad Danish (@mdanish-kh) 🙏🏼

  6. Dragon1573 commented on Apr 3, 2026

    @Dragon1573
    Author

    👀 On another Windows 11 Pro host device, v1.29.50-preview works fine ...

    It's really weird ...

    Image Image
  7. Dragon1573 commented on Apr 3, 2026

    @Dragon1573
    Author
    Console logs

    2026-04-04 01:45:13.513 [CORE] WinGet, version [1.28.190], activity [{C5F771FC-D68C-4D65-AFF8-EC7CAA043439}]
    2026-04-04 01:45:13.513 [CORE] Process: winget.exe[36424], Offset: 00007FFC9EC90000
    2026-04-04 01:45:13.513 [CORE] OS: Windows.Desktop v10.0.26200.8117
    2026-04-04 01:45:13.513 [CORE] Command line Args: "c:\users\dragon1573\appdata\local\microsoft\windowsapps\winget.exe" install -m .\manifests\s\sourcegit-scm\SourceGit\2026.07\ --verbose-logs --open-logs
    2026-04-04 01:45:13.513 [CORE] Package: Microsoft.DesktopAppInstaller v1.28.190.0
    2026-04-04 01:45:13.513 [CORE] IsCOMCall:0; Caller: winget-cli
    2026-04-04 01:45:13.518 [CLI ] WinGet invoked with arguments: 'install' '-m' '.\manifests\s\sourcegit-scm\SourceGit\2026.07\' '--verbose-logs' '--open-logs'
    2026-04-04 01:45:13.518 [CLI ] Found subcommand: install
    2026-04-04 01:45:13.518 [CLI ] Leaf command to execute: root:install
    2026-04-04 01:45:13.518 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
    2026-04-04 01:45:13.518 [YAML] Detected UTF-8
    2026-04-04 01:45:13.519 [YAML] Detected UTF-8
    2026-04-04 01:45:13.519 [CORE] Admin setting 'DefaultProxy' was not found or did not contain the expected format
    2026-04-04 01:45:13.519 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
    2026-04-04 01:45:13.519 [YAML] Detected UTF-8
    2026-04-04 01:45:13.519 [YAML] Detected UTF-8
    2026-04-04 01:45:13.519 [CORE] Admin setting 'DefaultProxy' was not found or did not contain the expected format
    2026-04-04 01:45:13.519 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
    2026-04-04 01:45:13.519 [YAML] Detected UTF-8
    2026-04-04 01:45:13.519 [YAML] Detected UTF-8
    2026-04-04 01:45:13.519 [CORE] Admin setting 'DefaultProxy' was not found or did not contain the expected format
    2026-04-04 01:45:13.519 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
    2026-04-04 01:45:13.519 [YAML] Detected UTF-8
    2026-04-04 01:45:13.519 [YAML] Detected UTF-8
    2026-04-04 01:45:13.519 [CORE] Admin setting 'DefaultProxy' was not found or did not contain the expected format
    2026-04-04 01:45:13.519 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
    2026-04-04 01:45:13.519 [YAML] Detected UTF-8
    2026-04-04 01:45:13.519 [YAML] Detected UTF-8
    2026-04-04 01:45:13.519 [CORE] Admin setting 'DefaultProxy' was not found or did not contain the expected format
    2026-04-04 01:45:13.519 [CLI ] Executing command: install
    2026-04-04 01:45:13.519 [YAML] Detected UTF-8
    2026-04-04 01:45:13.519 [YAML] Detected UTF-8
    2026-04-04 01:45:13.520 [YAML] Detected UTF-8
    2026-04-04 01:45:13.520 [CLI ] Manifest fields: Name [SourceGit], Version [2026.07]
    2026-04-04 01:45:13.521 [CLI ] Market Filter created with market: CN
    2026-04-04 01:45:13.521 [CLI ] Locale Comparator created with Required Locales: [] , Preferred Locales: [zh-CN, zh-TW, en-US] , IsInstalledLocale: 0
    2026-04-04 01:45:13.521 [CLI ] Architecture Comparator created with allowed architectures: [X64, Neutral, X86]
    2026-04-04 01:45:13.521 [CLI ] InstallerType Comparator created with Required InstallerTypes: [] , Preferred InstallerTypes: [msix, msi]
    2026-04-04 01:45:13.521 [CLI ] Starting installer selection.
    2026-04-04 01:45:13.521 [CLI ] Installer [X64,portable,Unknown,] is current best choice
    2026-04-04 01:45:13.521 [CLI ] Installer [Arm64,portable,Unknown,] not applicable: Machine is not compatible with Arm64
    2026-04-04 01:45:13.521 [CLI ] Completed installer selection.
    2026-04-04 01:45:13.521 [CLI ] Selected installer Architecture: 2
    2026-04-04 01:45:13.521 [CLI ] Selected installer URL: https://github.com/sourcegit-scm/sourcegit/releases/download/v2026.07/sourcegit_2026.07.win-x64.zip
    2026-04-04 01:45:13.521 [CLI ] Selected installer InstallerType: portable
    2026-04-04 01:45:13.521 [CLI ] Selected installer Scope: Unknown
    2026-04-04 01:45:13.521 [CLI ] Selected installer Language: 
    2026-04-04 01:45:13.528 [REPO] Creating checkpoint database directory: C:\Users\Dragon1573\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Checkpoints\{48D6685D-B753-4F8C-99B7-416F5B3B2C1C}
    2026-04-04 01:45:13.528 [REPO] Creating new Checkpoint database with version [Latest] at 'C:\Users\Dragon1573\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Checkpoints\{48D6685D-B753-4F8C-99B7-416F5B3B2C1C}\checkpoints.db'
    2026-04-04 01:45:13.535 [REPO] Adding checkpoint [automatic]
    2026-04-04 01:45:13.536 [REPO] Setting checkpoint data [0]
    2026-04-04 01:45:13.538 [REPO] Setting checkpoint data [1]
    2026-04-04 01:45:13.540 [REPO] Setting checkpoint data [2]
    2026-04-04 01:45:13.541 [REPO] Setting checkpoint data [2]
    2026-04-04 01:45:13.543 [REPO] Setting checkpoint data [2]
    2026-04-04 01:45:13.544 [REPO] Setting checkpoint data [3]
    2026-04-04 01:45:13.546 [CLI ] Register for restart with command line args: resume -g {48D6685D-B753-4F8C-99B7-416F5B3B2C1C}
    2026-04-04 01:45:13.577 [CLI ] Found existing installer file at 'C:\Users\DRAGON~1\AppData\Local\Temp\WinGet\sourcegit-scm.SourceGit.2026.07\3f5c13526659749874c90aa20afc5a43e0768d85406135aae5f5426cb682806f'. Verifying file hash.
    2026-04-04 01:45:13.600 [CLI ] Existing installer file hash matches. Will use existing installer.
    2026-04-04 01:45:13.600 [CLI ] Installer hash verified
    2026-04-04 01:45:13.600 [CORE] Started applying motw using IAttachmentExecute to C:\Users\DRAGON~1\AppData\Local\Temp\WinGet\sourcegit-scm.SourceGit.2026.07\3f5c13526659749874c90aa20afc5a43e0768d85406135aae5f5426cb682806f
    

  8. removed
    Needs-Triage
    on Apr 6, 2026
  9. KarbitsCode commented on May 15, 2026

    @KarbitsCode

    Ah, so this is what happened, I also got affected to this bug, I was so confused why winget suddenly won't install anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Command-InstallIssue-Bug

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions