Scripting a New Install With Winget

The windows package manager that could.

To start, i like to routinely image my devices just to get a fresh start on them. Often, i add apps or tools that I think that I will use, that I never end up using. Most of my devices get pretty cluttered pretty quickly too so re-imaging them is a way for me to avoid data hoarding. That way, everything that I need thats important ends up backed up somewhere on a different physical device. Typically, I re-image my devices once a semester if not once a year to keep things simple, and assign a time frame so that im not nuke and paving my device in the middle of the semester.

That being said, this time I decided to try out using winget to setup my device.

What is WinGet?

Well if you didnt already know, WinGet is the windows package manager (sorta). It allows for you to easily search for packages using winget search xxx and to install packages using winget install xxx, and finally winget update xxx. But a major pro to winget, and why it is alive and working today, is because it is for the most part community maintained. The entierty of winget exists in this github repository (https://github.com/microsoft/winget-pkgs). Interestingly enough, windows made some very important design decisions when making winget.

There will be no hosted distribution server like debian or arch package managers. Meaning that every package that you create for WinGet, must be publically accessible via other means. Typically, this means that you are creating an application on your own and releasing it, via github or your own applications website, and then creating a manifest file with instructions on where to find your installer, how to install it, and etc.

A Immediate issue with this kind of methodology is that winget becomes insanely slow to work with. Installing a package on windows already takes up quite a bit of time, but having to download the packages from a million different sites adds times to the installs. WinGet also doesnt asynchronously work like the apt or yum or pacman application managers do, so you are stuck with slow download speeds and slow installs.

Using WinGet to your advantage.

What apps do you use on a daily basis. Can you find it on winget? Probably.

  1. Go through all the apps on your computer and create a list.
  2. Search for each app on winget and generate a install string for the package. Something along the lines of winget install Mozilla.Firefox
  3. Paste the install string into a powershell script.
  4. When you setup or touch a new PC, just run that powershell script and when you come back, your computer will be ready to go with freshly installed tools.
GNU General Public License v3.0
Built with Hugo
Theme Stack designed by Jimmy