Stephan van Rooij

Software architect with a passion for home automation.

Clean developer install - Winget

C

A clean windows installation just feels faster, and as a developer I want a fast machine! Why don’t you just reinstall your machine once a month, you ask? Because it takes a lot of time to set it up just right.

Scripting the reinstall

I wouldn’t be a developer if I didn’t like scripts, so why not script the reinstalling of my machine. Great idea, that’s exactly what I did.

Winget

Winget is a Windows command line package manager. It works great to install a lot of software.

Find spotify on winget: winget search spotify. Install spotify: winget install Spotify.Spotify, and boom Spotify is installed. No need to next, next, next click through a setup.

Winget export

You can also export all currently installed packages (that are available in winget).

Run: winget export [filename]

You will end up with a json file similar to this one.

Winget import

Now you got that file exported from your old install (and saved it somewhere save), let’s reinstall all those programs in one go.

Run: winget import -i [filename]

If you’re like me, and got a huge amount of packages in your winget file, this is a great moment to get yourself some coffee or go for lunch. Winget will automatically download and install all the packages specified. In my case it will be downloading Visual studio 2022 professional, Office, Teams and VSCode, among others.

Like what you're seeing? Consider Sharing on Twitter or Sponsoring me