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
22.54k stars 1.39k forks source link

Recent Windows 11 update broke/removed winget #4586

Closed Nexxsys closed 4 days ago

Nexxsys commented 4 days ago

Brief description of your issue

I have tried the various solutions listed in a previous bug/issue here, but with the same result: winget is an unrecognized cmdlet.

PS C:\Users\nexxsys> winget-install
winget-install 4.1.2
To check for updates, run winget-install -CheckForUpdate
To delay script exit, run winget-install -Wait

#################
# Prerequisites #
#################

Downloading VCLibs...
Downloading UI.Xaml...

##########
# winget #
##########

Downloading winget license...
Downloading winget...
Installing winget and its dependencies...

############
# Complete #
############

winget installed successfully.
Checking if winget is installed and working...

###############
# Registering #
###############

winget command registered successfully.

PS C:\Users\nexxsys> winget
winget : The term 'winget' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify 
that the path is correct and try again.
At line:1 char:1
+ winget
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (winget:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\nexxsys> 

Steps to reproduce

https://github.com/microsoft/winget-cli/issues/3832

Tried this - no change in PowerShell 5 and 7 as adminstrator

Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile winget.msixbundle
Add-AppxPackage winget.msixbundle
del winget.msixbundle

Tried this - no change in PowerShell 5 and 7 as administrator

Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted
Install-Script -Name winget-install -Force
winget-install.ps1 -Force

Expected behavior

Installation of winget-cli to a functional state.

Actual behavior

winget not a recognized cmdlet

Environment

POWERSHELL_DISTRIBUTION_CHANN… MSI:Windows 10 Home
PROCESSOR_ARCHITECTURE         AMD64
PROCESSOR_IDENTIFIER           AMD64 Family 25 Model 33 Stepping 2, AuthenticAMD
PROCESSOR_LEVEL                25
PROCESSOR_REVISION             2102
github-actions[bot] commented 4 days 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.

Nexxsys commented 4 days ago

Resolved. Had to add the following to User Path: %USERPROFILE%\AppData\Local\Microsoft\WindowsApps