Restoring Winget Functionality on W11 Desktops
Restoring Winget Functionality on W11 Desktops
Winget is a command-line tool that can download and install app packages from MS Store and the apps listed in its repository. It saves a lot of time that would be otherwise wasted in searching the Microsoft Store or the web for a particular app, downloading it, and then manually installing it.
But some users report that Winget is not working on their PC. They face a “The system cannot execute the specified program” and cannot run any commands, This post will discuss multiple methods to resolve the issue and restore Winget to its working state. Let’s begin.
Disclaimer: This post includes affiliate links
If you click on a link and make a purchase, I may receive a commission at no extra cost to you.
Reasons Why Winget Stops Working on Windows
Here are the following reasons why Winget is not working on your Windows PC:
- You are running an outdated version of the App Installer.
- Winget servers are down, or you don’t have an active internet connection.
- The app execution alias is not configured or inactive for Winget.
- App Installer failed to add the PATH environment variable automatically while installing.
Now, you know the reasons behind Winget not working issue. Try out these eight methods to resolve the issue and use your favorite package manager again.
1. Close and Reopen Winget in the Terminal App
Before moving on to advanced fixes, completely close the Command Prompt or PowerShell instance you are running on the PC. You can use the Task Manager to stop an unresponsive instance of either of these command-line tools.
After that, open Command Prompt or PowerShell with administrator privileges on your system. Type Winget and press the Enter key to check if Winget works now.
2. Check if the Winget Servers Are Down
Winget is an online tool that needs a robust internet connection to search for a package in various repositories and then download and install them. If the Winget servers are down or inactive, it won’t be able to fetch results from repositories. So, check if Winget servers are down using DownDetector or a similar website.
You can also check if your Windows PC can connect to the internet. Simply open a web browser and access a website or run a web-based app to confirm internet connectivity. If the servers are down, you will have to wait until they come up live again to use Winget.
3. Perform a Complete System Shutdown
Windows uses Fast Startup to hibernate kernel-level processes and if any of these glitch, they remain in that state after your power on the system. So, perform a complete shutdown to close and relaunch all the core services and then try to run Winget. Here’s how to do it:
- Press Win + R to open the Run dialog box. Type cmd and press Ctrl + Shift + Enter keys to open the Command Prompt with administrator privileges .
- Now, type the following command and press the Enter key: shutdown /s /f /t 0
- Your system will shut down. It will take longer than a usual shutdown because Windows will close everything.
- Power on your system and try to run Winget using the Terminal app to check if it works now.
4. Update App Installer
Winget is a part of Windows 10 and 11 now and is shipped to PCs using the App Installer application. If you haven’t updated the App Installer in a while, you can face issues in running Winget and managing packages. Winget is included only in version 1.11.11451 or higher of the App Installer. If you have a version older than that, you cannot use Winget from the terminal.
So, open Microsoft Store and check the library section for any pending updates for the App Installer. Manually search and install the update and check if Winget works now.
5. Enable the App Execution Alias
If the App Execution Alias for Winget is disabled, it won’t work when you try accessing Winget from the terminal. So, you must enable it in the app settings. Repeat the following steps:
- Right-click on the Start button to open the Power User menu. Click on the Settings app.
- Navigate to the left-hand side menu and click on the Apps option.
- Now, click on the Advanced app settings option. Then click on the App execution aliases option.
- Locate the Windows Package Manager Client option. Check the toggle next to it. If it is disabled, click on it to enable the app execution alias for the app.
- Close the Settings app.
6. Manually Add the Path Environment Variable
Ae wrongly configured Winget path can also produce errors. So, you must manually add the correct path in Environment Variables using the Advanced System Properties window. Repeat the following steps:
- Press Win + R to open the Run dialog box . Type sysdm.cpl ,3 in the text box and press the Enter key to open Advanced System Properties.
- Click on the Environment Variables button. Click on the Path entry and then click on the Edit button.
- Now, click on the New button and paste the following path: %UserProfile%\AppData\Local\Microsoft\WindowsApps
- Click on the OK button. Restart your PC.
- Open the Terminal app and check if Winget works or not.
7. Re-register Winget Using PowerShell
If Winget isn’t working on your PC, you can re-register it using PowerShell. Since it is a part of the App Installer which is a system app, it is possible to re-register it. Repeat the following steps:
- Press Win + R to open the Run dialog box. Type PowerShell and press the Ctrl + Shift + Enter keys at once.
- The PowerShell window will launch with admin rights. Paste the following code and press the Enter key to execute it:
Add-AppxPackage -DisableDevelopmentMode -Register "C:\Program Files\WindowsApps\Microsoft.Winget.Source_2021.718.1322.843_neutral__8wekyb3d8bbwe\AppXManifest.xml" -Verbose
- You won’t see any confirmation message after the command executes successfully. Close the PowerShell window and restart your PC.
8. Try Some Generic Windows Fixes
If none of the methods work for you, try our generic fixes like SFC and DISM scans that find and fix the system file corruption and service Windows Image components. You must run the SFC scan first and allow it to find and replace the corrupt system files, if any. After that, run the DISM scan in online mode.
After running these scans, you can use System Restore to revert the PC to a point in time when everything worked fine. Lastly, you can perform a complete system reset. You can choose the Keep my files option to preserve all your files while factory resetting Windows .
Make Winget Functional Again
Winget is a fantastic package manager that helps you control and manage app packages from the terminal. Ensure robust internet connectivity and check if the app execution alias is active for Winget. Manually reconfigure the PATH for Winget and re-register the App Installer using PowerShell. If you want a GUI version of Winget, you can try Winstall which helps you batch-install apps.
But some users report that Winget is not working on their PC. They face a “The system cannot execute the specified program” and cannot run any commands, This post will discuss multiple methods to resolve the issue and restore Winget to its working state. Let’s begin.
Also read:
- [New] 2024 Approved Elevate Your Channel Game - TubeBuddy Insights
- [New] From Concepts to Shares Your Guide to Metaverse Meme Creation
- [Updated] 2024 Approved Dive Into Video Production Mastering Green Screens on YT
- Clear Cut Techniques: Eradicate Stutter in Your WinX Media Streams
- Getting the Pokemon Go GPS Signal Not Found 11 Error in Tecno Camon 20 | Dr.fone
- How to Reset a Nubia Red Magic 8S Pro+ Phone That Is Locked | Dr.fone
- In 2024, 3uTools Virtual Location Not Working On Xiaomi Redmi A2+? Fix Now | Dr.fone
- In 2024, Cha-Cha Chickadees
- Master the Art of Photo Size Transformation with These Six Ways on Windows 11
- Overcoming Windows OneDrive Server Failures: A Quick Guide
- Restoring Windows Notification Service for Phone Link App
- Thinking About Changing Your Netflix Region Without a VPN On Google Pixel 7a? | Dr.fone
- Top 12 Prominent Nubia Z50 Ultra Fingerprint Not Working Solutions
- Unveiling the Secrets of Windows 11'S App Collection
- USB Wi-Fi Anomalies on Windows? Here's the Solution Guide You Need
- Title: Restoring Winget Functionality on W11 Desktops
- Author: David
- Created at : 2024-10-14 06:26:55
- Updated at : 2024-10-20 18:35:57
- Link: https://win11.techidaily.com/restoring-winget-functionality-on-w11-desktops/
- License: This work is licensed under CC BY-NC-SA 4.0.