Installing winget fails on windows server 2025 console
Relevant area(s)
WinGet CLI
Relevant command(s)
No response
Brief description of your issue
Attempting to install winget via console fails.
Steps to reproduce
- start up a windows server 2025 machine
- login in via some headless remote management (e.g. AWS EC2 console or SSH)
- attempt to install winget following the Sandbox installation instructions (since the store isn't available) on https://learn.microsoft.com/en-us/windows/package-manager/winget/#install-winget-on-windows-sandbox
- observe failure
Expected behavior
Successful installation, since windows server 2025 is listed as a supported OS.
Actual behavior
Installation fails
PS C:\Windows\system32> Repair-WinGetPackageManager -AllUsers
Add-AppxPackage : Deployment failed with HRESULT: 0x80073D19, An error occurred because a user was logged off.
Failed to determine the type of current user's profile with error 0x80070002.
NOTE: For additional information, look for [ActivityId] 72b84413-1867-0005-376a-b8726718dd01 in the Event Log or use the command line Get-AppPackageLog -ActivityID 72b84413-1867-0005-376a-b8726718dd01
At line:1 char:1
Get-AppPackageLog -ActivityID 72b84413-1867-0007-b650-b8726718dd01
Time ID Message
---- -- -------
7/20/2026 5:16:22 PM 603 Started deployment Add operation on a package with main parameter Microsoft.VCLibs.140.00_14.0.33519.0_x64.appx and Options 0 and 0. See
http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
7/20/2026 5:16:22 PM 157 The app package signature was validated for core content of the app package published by CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US.
Payload won't be validated until the files are read.
7/20/2026 5:16:23 PM 216 App manifest validation warning: Declared namespace http://schemas.microsoft.com/developer/appx/2015/build is inapplicable, it will be ignored during manifest processing.
7/20/2026 5:16:23 PM 170 The streaming reader was created successfully for app package Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe.
7/20/2026 5:16:23 PM 10002 Creating Resiliency File C:\ProgramData\Microsoft\Windows\AppRepository\1568df44-f9bb-4abe-a072-c35237bbec12_S-1-5-21-1694833106-3775304536-1588476690-1000_3.rslc for Add
Operation on Package Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe.
7/20/2026 5:16:23 PM 607 Deployment Add operation on package Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe has been de-queued and is running for user SID
S-1-5-21-1694833106-3775304536-1588476690-1000.
7/20/2026 5:16:23 PM 854 Successfully added the following uri(s) to be processed: file:///C:/Windows/TEMP/lsoy0q0i.wvo/x64/Microsoft.VCLibs.140.00_14.0.33519.0_x64.appx.
7/20/2026 5:16:23 PM 855 Finished resolving action lists. DeploymentRequest action lists: addPackageList: Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe.
7/20/2026 5:16:23 PM 858 Failed to determine the type of current user's profile with error 0x80070002.
7/20/2026 5:16:23 PM 605 Error 0x80070002: Failure in the BlockDeploymentIfNeeded state handler.
7/20/2026 5:16:23 PM 401 Deployment Add operation with target volume C: on Package Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe from: (Microsoft.VCLibs.140.00_14.0.33519.0_x64.appx)
failed with error 0x80073D19. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
7/20/2026 5:16:23 PM 698 Deployment Add operation with target volume C: on Package Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe from: (Microsoft.VCLibs.140.00_14.0.33519.0_x64.appx)
failed with error 0x80073D19. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
7/20/2026 5:16:23 PM 404 AppX Deployment operation failed for package Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe with error 0x80073D19. The specific error text for this failure is:
Failed to determine the type of current user's profile with error 0x80070002.
Environment
OS Name : Microsoft Windows Server 2025 Datacenter
OS Version : 10.0.26100 N/A Build 26100
@aagmv - Your issue is with this line:
login in via some headless remote management (e.g. AWS EC2 console or SSH)
WinGet expects to be run from the context of a logged in user. Attempting to perform any WinGet operations (Including the repair operation, which attempts to ensure the winget source is downloaded and installed for the user) through SSH is not currently possible
Duplicate of #3862
WinGet expects to be run from the context of a logged in user.
Does that mean the package-manager needs a human-in-the-loop and is not suited for automation? This should be a big disclaimer stated on top of the README.
The following error is not related to your issue and an error in event viewer reoccuring every hour. I have not seen it not appearing in the past few years through different clean Windows installations and its process is svchost.exe (LocalService Restricted Network).
App manifest validation warning: Declared namespace http://schemas.microsoft.com/developer/appx/2015/build is inapplicable, it will be ignored during manifest processing.
Dont bother trying to fix it. It happens on Windows 11 Pro 25H2-26H2, on clean installation with a personal MS account.
Same with StateRepository: Fout 0x15: misuse at line 185353 of [737ae4a347]
This bug error is appearing since a build a few months ago.