This guide shows you how to find and install Windows applications directly from the command line using built-in tools like winget and choco. You’ll learn to search, install, and manage apps without opening the Microsoft Store or a web browser, which is especially handy for automation or quick setups.
What You’ll Need
- Windows 10 (version 1809 or later) or Windows 11
- An internet connection
- Administrator rights (for most installs)
- Command Prompt, PowerShell, or Windows Terminal
Step-by-Step
- Open a command-line interface. Press
Win + Xand select “PowerShell (Admin)” or “Command Prompt (Admin)”. If you prefer, search for “cmd” or “PowerShell” in the Start menu, right-click, and choose “Run as administrator”. - Check if
wingetis available. Typewinget --versionand press Enter. If you see a version number, you’re ready. If not, install it from the Microsoft Store (search “App Installer”) or download the latest version from the official Microsoft website. - Search for an app. Use
winget searchfollowed by a keyword. For example,winget search "visual studio code"orwinget search vlc. This lists matching packages with their ID, source, and version. - Identify the exact package ID. Look at the “Id” column in the search results. It’s usually in the format
Publisher.AppName, likeMicrosoft.VisualStudioCode. Using the exact ID avoids ambiguity. - Install the app. Run
winget install --id(replacewith the actual ID). For example: winget install --id Microsoft.VisualStudioCode. Add--accept-package-agreements --accept-source-agreementsto skip prompts. - Wait for the installation to complete. The command will download and install the app, showing progress in the terminal. Once done, you’ll see a success message.
- Verify the installation. Run
winget listto see installed packages, or simply launch the app from the Start menu. - Use alternative tools if needed. If
wingetdoesn’t have the app, you can use Chocolatey. Install it first by runningSet-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))in an admin PowerShell. Then search withchoco searchand install withchoco install.-y - Update apps from the command line. To update all packages, run
winget upgrade --all. For a specific app, usewinget upgrade --id. - Uninstall apps. Use
winget uninstall --idto remove an application.
Common Mistakes
- Not running as administrator. Many installs require elevated rights. If you get an access denied error, close and reopen the terminal as admin.
- Using the wrong package name. Searching for “VLC” might return multiple results. Always use the exact
--idfrom the search output. - Ignoring source agreements. Some sources (like the Microsoft Store) require you to accept terms. Use the
--accept-source-agreementsflag to avoid being stuck. - Typing the ID with spaces. IDs have no spaces; if you copy from the terminal, make sure there are no extra characters.
- Forgetting to update winget itself. An outdated winget might not find newer apps. Run
winget upgrade --id Microsoft.AppInstallerto update it.
Tips
- Use wildcards in search. For example,
winget search "*notepad*"finds all packages with “notepad” in the name. - Export your installed apps. Run
winget export -o apps.jsonto save a list. You can reinstall them on a new PC withwinget import -i apps.json. - Silent installs. Add
--silentto avoid any UI prompts during installation. Not all apps support it, but many do. - Check the source. Use
--source wingetto restrict to the winget repository, or--source msstorefor the Microsoft Store. This can speed up searches. - Create aliases. In PowerShell, you can create a function like
function Install-App { winget install --id $args[0] }to shorten the command.
Troubleshooting
- “winget is not recognized” – This means winget isn’t installed or the PATH is not set. Install the App Installer from the Microsoft Store, or download the latest .msixbundle from Microsoft’s GitHub releases.
- “No package found matching input criteria” – Check the spelling, try a broader search, or use
winget searchto search only the community repo.--source winget - Install fails with “Hash mismatch” – This is often a temporary issue. Try again after a few minutes, or use
winget install --idto bypass the hash check (use with caution).--force - “The parameter is incorrect” – This can happen if you use a malformed ID. Copy the ID directly from the search output, not from memory.
- Chocolatey install fails – Ensure you’re in an admin PowerShell and that the execution policy allows scripts. If you get a TLS error, run the security protocol line again.
- App installs but doesn’t appear – Some apps require a restart or a log-off. Check the Start menu after restarting.
Frequently Asked Questions
Can I install apps from the Microsoft Store using the command line?
Yes, winget can install apps from the Microsoft Store. Use winget install --id . You may need to accept agreements.
What if the app I want isn’t in winget?
Try Chocolatey or the app’s official website. You can also request the package on the winget repository.
Is it safe to use winget?
Yes, winget is an official Microsoft tool. Packages come from trusted sources like the Microsoft Store or verified repositories, but always review the source before installing.
Can I install multiple apps at once?
Yes, you can chain commands like winget install --id App1 && winget install --id App2 in PowerShell, or use a script.
How do I update all apps with one command?
Run winget upgrade --all to update all installed packages that have updates available.
Does winget work on Windows 10?
Yes, winget works on Windows 10 version 1809 and later, and on Windows 11. Install the App Installer to get it.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Stop Chrome Auto-Opening on Windows Startup
- Snapchat Security: 12 Tips to Lock Down Your Account
- Missing Comma on iPhone Keyboard: Fix & Where It Went
- Get Pixel Weather & Screenshot Apps on Any Android
- Other Storage on Android: What It Is & How to Clean It
- Facebook Messenger Games: How to Play With Friends