We discussed what a package manager is in our previous article on chocolatey. Long story short here you don’t have to download and run exe files to install an application. Rather you just run a cmd command in the terminal window and chill. Now in contrast to windows trend, they have given us a built-in package manager. And that’s Winget. This article will be about how to use it. So if you’re into this keep reading.
Where is Winget?
As I said previously, Winget is preinstalled in the system. So you don’t need to install it separately. Just run your PowerShell or command prompt window in administrator mode. You start writing commands. To run cmd or PowerShell in the elevated mode you can right-click on the Start button and click on Windows Powershell (admin.) Also, you can search for cmd in the start menu then run it as administrator.
Do I have Winget?
If your windows version supports you can type
winget and press enter to find out windows recognizes it. Now if it doesn’t then you know, it’s time for a windows update. Go to settings. Then head to Updates and Security. Furthermore, go to the Windows Insider Program to set it up. Consequently, choose the Fast ring to get the latest update. Hence you are now rolled in to get the latest Windows version update. Just sit back and let the latest version of Windows download and install itself. A few restarts later you’ll be able to enjoy Winget.
You must know some basic commands to operate the manager. The first command should be -search. Type
winget search nameoftheapp to find if the app is available or not. So if it’s present you’ll know the details about it.
Now -install. Furthermore, if you want to install that app just type in
winget install nameoftheapp. And it will download the app fast and install it.
Consequently -show command. Type
winget show nameoftheapp to know detailed information about any app you want.
Finally -help command. This will just help you to know a little about this. Not that useful but still if you seem lost you can use it. Just type
winget help and it will show you the help menu.
Some fun stuff
The Microsoft store apps are also available to Winget. Therefore you can use the terminal windows to install store apps now on. No need to visit the store, find the app, then wait for it to be downloaded and so on. You just have to type
winget install Microsoft.appname to install the specific store apps.
Batch install apps
You knew I would come to this at some point. With the service you can install multiple apps with just a script. But I’m not here to teach you this. Look at the script here.
Echo Install Powertoys and Terminal
winget install Microsoft.Powertoys
if %ERRORLEVEL% EQU 0 Echo Powertoys installed successfully.
winget install Microsoft.WindowsTerminal
if %ERRORLEVEL% EQU 0 Echo Terminal installed successfully.
All you have to do is write a txt file like this just change the name of the apps or add some more as your wish, then save it as a cmd file. Consequently, run it as administrator and voila.
A little trick from “Winstall”
There is a web based service at https://winstall.app/store. You can use there GUI to download apps like ninite used to do. So go to the site, select the packages and you can install them in a simpler way. If you’re not a fan of running commands that can help you a lot.
Basic Help section ==>
So that was it for this article. Hope you have a better understanding of the Winget package manager. Therefore in future when you reset your pc you know this pre-installed service is there to help you. Have fun. But remember while this service is extremely useful it’s still in beta. So there will be bugs and problems here and there. Proceed with caution.