winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

ResourceUnavailable: Program 'winget.exe' failed to run: An error occurred trying to start process

Open simsrw73 opened this issue 3 years ago • 5 comments

Brief description of your issue

Everything worked fine a few days ago when I last updated winget update --all, but after install the new Windows 11 22H2 update this morning, I can no longer run winget:

Steps to reproduce

winget upgrade --all

or any reference to winget

winget

Expected behavior

Unable to run any winget command.

Actual behavior

ResourceUnavailable: Program 'winget.exe' failed to run: An error occurred trying to start process 'C:\Users\simsrw73\AppData\Local\Microsoft\WindowsApps\winget.exe' with working directory 'C:\Users\simsrw73'. The file cannot be accessed by the system.At line:1 char:1
+ winget upgrade --all

Environment

Windows 22H2
Also just manually updated Windows Package Manager 1.3.2691

simsrw73 avatar Oct 05 '22 13:10 simsrw73

Did you upgrade from 22H1 to 22H2 or an earlier version of Windows?

We're going to try to reproduce this issue to see what is causing it and what we can do to correct it.

denelon avatar Oct 05 '22 16:10 denelon

I had the latest stable release. I've run Windows manually every other day for the last week or so because I was waiting on the 22H2 release to drop. Stable versions. Have not run preview releases on this system.

I doubt that it matters, but since it's referencing my user directory, I will note that I installed Windows 11 initially with a local user account (non-Microsoft linked account). Just so I could choose my home directory name. I linked it to Microsoft account immediately after install. This is a relatively new install of Windows, early May. Doubt that matters.

Always use winget to install and update and do so frequently. Never had any problem.

simsrw73 avatar Oct 05 '22 17:10 simsrw73

Well. It's fixed. More updates pushed through tonight (WSL, Defender, Cumulative for 22H2). After updating and restarting, winget is running normally. Although, WT now no longer recognizes my nerd fonts. This is the jankiest Windows update I've experienced in a long time.

simsrw73 avatar Oct 06 '22 02:10 simsrw73

There is a reason most people wait for a bit before installing a H update

Masamune3210 avatar Oct 06 '22 04:10 Masamune3210

@simsrw73 thanks for follow up. I'm sure others will likely encounter or have already encountered the same thing.

denelon avatar Oct 06 '22 15:10 denelon