You type a winget command in Command Prompt or PowerShell and Windows says the term is not recognized, or the command closes without displaying anything. WinGet, the Windows package manager, is not a separate program: it ships with the App Installer component, delivered through the Microsoft Store. The fault almost always comes from that component, its execution alias or the PATH.
Typical messages (in English in the Microsoft documentation; the wording on a non-English Windows may differ):
'winget' is not recognized as an internal or external command,
operable program or batch file.
winget : The term 'winget' is not recognized as the name of a cmdlet, function, script file, or operable program.
Observe before acting
| What you see | Most likely cause | Step |
|---|---|---|
| New PC or freshly created account | WinGet not yet registered for this account | Step 1 |
| Command unknown everywhere, App Installer missing or old | Component missing or too old | Step 2 |
| The full path works, but not the word winget alone | Alias disabled or PATH modified | Step 3 |
| winget exits without a message | Old version using a retired CDN | Step 4 |
| "cannot be accessed by the system" error or visibly damaged package | Corrupted package registration | Step 5 |
Supported systems: WinGet is supported on Windows 10 version 1809 (build 17763) and later, Windows 11 and Windows Server 2025. It is not available in Windows Sandbox, nor in a session running as SYSTEM.
Step 1: register WinGet for your account
When to use it: on a new PC, right after installing Windows or at a new account's first sign-in. Microsoft states that WinGet is only available after the first sign-in: the Microsoft Store registers it asynchronously.
Expected result: a version number is displayed.
Rollback: none, the command only registers an already present package for your account.
Step 2: install or update App Installer
When to use it: the command is still unknown after step 1, or the component is missing (reduced Windows edition, Microsoft Store removed, corporate image).
Expected result: the command responds after the update.
Rollback: not needed, this is a Windows component maintained by Microsoft.
If the Microsoft Store itself does not open, fix that first: Microsoft Store not opening or downloads stuck (French guide).
Step 3: check the execution alias and the PATH
When to use it: the component is installed (step 2) but the word winget alone is not found.
Expected result: winget --version responds in a new window.
Rollback: the alias can be turned off again in the same place; an entry added to the PATH is removed from the same window.
Step 4: winget exits without any message
When to use it: the command is recognized but produces no output.
Expected result: winget search displays results again.
Rollback: none.
Step 5: repair the component
When to use it: after steps 1 to 4, or if the "Program 'winget.exe' failed to run" error appears. Both methods below come from the Microsoft documentation and the official repository; start with the first one.
Expected result: winget --version responds after closing and reopening the terminal.
Rollback: the reset returns the component to its original state; software already installed with WinGet is not uninstalled.
Special cases
| Situation | Explanation |
|---|---|
| Works for one account, not another | The component is registered per user: repeat step 1 in the affected session. |
| Script launched by a scheduled task as SYSTEM | The WinGet command-line client is not supported in that context. |
| Windows Sandbox | WinGet and the Microsoft Store are not included. |
| Corporate PC | A policy may block the Store or WinGet: contact your IT department. |
Final check
- ☐ winget --version displays a version number.
- ☐ winget search returns results.
- ☐ The command works in a new window, in both Command Prompt and PowerShell.
For deeper diagnosis, winget --info shows, among other things, the log location (by default %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir).
Sources
- Microsoft Learn: Use WinGet to install and manage applications
- Microsoft Learn: Troubleshoot WinGet
- Official WinGet repository (common issues): microsoft/winget-cli on GitHub
- Microsoft Store: App Installer
Still having the problem?
Reply to this topic with your Windows version (Windows key + R, winver), the exact message you get, the output of Get-AppxPackage microsoft.desktopappinstaller (the Version line only) and whether the PC is managed by a company or school. Remove your user name from paths before copying them.