How to Fix Winget Is Not Recognized on Windows

Winget Not Recognized Error On Windows

Winget, also known as the Windows Package Manager, is a tool that allows you to install applications and packages using Command Line Interfaces (CLIs), like Command Prompt and PowerShell. But sometimes, when you run a Winget command, you can get an error that says the CLI doesn’t recognize it. This guide shows how to get rid of this annoying error and get Winget working again.

Good to know: learn the differences between Command Prompt and PowerShell.

1. Reregister Winget

One of the biggest causes of this Winget error is a corrupt or misconfigured installation of the Windows Package Manager. If this is the case, you can easily fix it by reregistering Winget, which will reset the installation and potentially fix any problems it may have.

  1. Type “PowerShell” in the Search box, and click on the best match below.
Opening Powershell Windows Search.
  1. Copy and paste the following command into PowerShell, and press Enter.
Add-AppxPackage -DisableDevelopmentMode -Register "C:\Program Files\WindowsApps\Microsoft.Winget.Source_2021.718.1322.843_neutral__8wekyb3d8bbwe\AppXManifest.xml" -Verbose
Command to re-register Winget in Powershell.

2. Enable App Execution Alias for Windows Package Manager

In the command-line context, the name Winget is the app execution alias for Windows Package Manager. Basically, app execution aliases are CLI commands in their shortened or abbreviated form. If you disable this feature for the Windows Package Manager, it can cause CLIs to not recognize Winget. To enable app execution aliases for the Windows Package Manager, follow the steps below:

  1. Press Win + I to open the Settings app, head to “Apps -> Advanced app settings,” and click on “App execution aliases.”
  1. If the toggle for “Windows Package Manager Client” is “Off,” click on it to turn it on.
Toggle for Windows Package Manager Client in Settings.
  1. Windows 10 users can find the toggle for Windows Package Manager Client by going to “Settings -> Apps -> Apps & Features,” and clicking on the “App execution aliases” link.

Tip: if you’re relatively new to PowerShell, learn these essential commands.

3. Verify You Have the Latest Version of App Installer

Winget is a part of App Installer, a preinstalled Windows package that allows users to easily install and manage programs. If App Installer glitches out, it can lead to the Winget error. To fix App Installer, update it from the Microsoft Store.

  1. Open Microsoft Store through Windows Search.
Opening Microsoft Store in Windows Search.
  1. Click on the search bar at the top, type “app installer,” and click on “App Installer” in the results.
Searching for App Installer in Microsoft Store.
  1. Click “Update” to begin updating App Installer.
Updating App Installer in Microsoft Store.

4. Reinstall App Installer from GitHub

If updating App Installer doesn’t work, perhaps reinstalling it can help fix whatever is causing Winget to malfunction. To do that, follow the steps below:

  1. Go to the Windows Package Manager GitHub page.
  1. Scroll down to the “Assets” section, and click on the App Installer’s MSIXBundle file to download it.
Downloading App Installer Msixbundle from GitHub.
  1. Double-click the file you just downloaded, and click on “Reinstall” in the pop-up window.
Reinstalling App Installer screen.
  1. Follow the rest of the instructions to complete reinstalling App Installer.

FYI: be sure to check out this list of Windows apps you should uninstall immediately.

5. Create a Path Environment Variable for Winget

When you run the Winget command in Command Prompt or PowerShell, Windows will search the PATH variable for the file it needs to execute it. In a nutshell, this variable maintains a list of directories that contain executables for various commands on Windows. If PATH doesn’t list the directory containing the Winget executables, you will run into the error.

To fix this, you’ll have to manually add the missing directory to the PATH variable:

  1. Press Win + R to bring up Windows Run, enter systempropertiesadvanced in the text box, and click “OK.” This will launch the System Properties window.
Opening System Properties from Run window.
  1. Select the “Advanced” tab, then click on “Environment Variables.”
Clicking "Enviromental Variables" button in System Properties.
  1. Select the “Path” variable, then click on “Edit” to open the “Edit environment variable window.”
Process to Edit Environmental Variable.
  1. Copy the following file path: “%UserProfile%\AppData\Local\Microsoft\WindowsApps.”
  1. In the “Edit environment variable window,” click on “New.”
Clicking "New" button in Edit environment variable window.
  1. Paste the file path you copied in step #4, then click “OK” to save the changes.
Pasting Environmental Variable at location.

6. Reset Your Windows PC to Factory Defaults

If all else fails, it could mean that there’s a deeper corruption or misconfiguration with your OS at hand. If you’re at a loss on what to do, resetting Windows to factory defaults can help you start afresh with the settings and configurations that can affect Winget. But before you reset your PC, make sure you back up your important data, as you’re going to lose it in the process.

Tip: learn which option is the best when doing a Windows reset: a cloud download or local reinstall.

Get Winget Working Again on Your PC

If you prefer to install things through Windows Package Manager in Command Prompt or PowerShell, Winget is an essential utility. When the command-line tools on your PC can’t recognize it, it can dampen your Windows experience. By following the troubleshooting steps above, you can get it working again.

If you’re looking for an alternative to Winget, try using Chocolatey to install various applications on your Windows PC.

All screenshots by Chifundo Kasiya.

Is this post useful?
Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Chifundo Kasiya
Chifundo Kasiya - Staff Writer

Chifundo is a tech writer who loves all things computers and gaming. He has been a freelancer writer for over 10 years and loves tackling complex topics so he can break them down for everyone to understand. He is also an artist, game programmer, and amateur philosopher. As a tech writer for MTE, he focuses mainly on Windows.