microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.21k stars 1.45k forks source link

any winget command does nothing! #4275

Closed youngunix closed 7 months ago

youngunix commented 7 months ago

Brief description of your issue

Issuing commands such as winget upgrade -r -u or winget list does nothing, just the cursor blinking. I tried installing winget via Add-AppxPackage -Patch C:\Users\dev\Downloads\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle and still nothing.

I am also noticing that explorer freezes on launch and is unusable & launching notepad does nothing.

Prior to this issue:


Steps to reproduce

undetermined.

Expected behavior

execute the commands successfully and output the results.

Actual behavior

nothing happens.

Environment

can't get the packages info since winget and get-appxpackage are not working.

Windows 11
version 23H2
github-actions[bot] commented 7 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Trenly commented 7 months ago

Can you share the output from the following command? I find it very odd that Get-AppxPackage wouldn't be working, as that has nothing to do with winget. Does Get-AppxPackage *Microsoft.UI.Xaml* work?

systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version"
youngunix commented 7 months ago

Can you share the output from the following command? I find it very odd that Get-AppxPackage wouldn't be working, as that has nothing to do with winget. Does Get-AppxPackage *Microsoft.UI.Xaml* work?

systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version"

It has been over 5min and Get-AppxPackage *Microsoft.UI.Xaml* still hanging with no output.

OS Name: Microsoft Windows 11 Enterprise OS Version: 10.0.22631 N/A Build 22631

Trenly commented 7 months ago

Definitely seems like it must be something on the OS side then, since the Get-AppxPackage shouldn't hang like that. Explorer also shouldn't be freezing on launch. The only thing I can think may help fix those issues is a clean install

youngunix commented 7 months ago

Well, the command Get-AppxPackage *Microsoft.UI.Xaml* just now displayed the output but it's still hanging, which means it's still searching or working on whatever it needs to do.

I want to blame the SSD but it's not fair since 3rd party apps work fine.

I am suspecting one of the group policies I activated is the culprit.

youngunix commented 7 months ago

I wasn't able to figure out what caused this issue, but I was able to solve it.

Steps to fix this problem if anyone finds themselves in the same situation:

  1. Download the Win 11 installation ISO.
  2. Extract it (or mount it).
  3. Run the setup.exe as administrator.
  4. At the setup.exe window, click on "Change how Setup downloads updates".
  5. Choose "Download updates, drivers and optional features (recommended)".
  6. At the "Ready to install" window, make sure "Install Windows 11 Enterprise" and "Keep personal files and apps" are checked.
  7. click "Next" and let it do its thing.