Have you ever got your PC to the state where it has all the settings and software installed and configured that you need to use and it’s just in the right state for your daily tasks and then bam something happens, and you need to rebuild or start from scratch with a new PC?
Yip, I’ve been there and it’s always super annoying trying to get your PC back to the state you had it in before. Thankfully, a lot of things are getting better, and you have technology that can sync your settings that can then be pulled down again easily speeding up the rebuild of your PC to the way you like it. But what about the software you like to have installed with that specific version installed that does just what you want?
Windows Package Manager is an open-source project that Microsoft announced at Build 2020 and version 1.0 was released at Build 2021. It can help you manage and install software onto your machines in an easy and consistent way.
So how can it help with the initial problem, well the Windows Package Manager has an import and export features that allows you to export a list of software installed on your PC and then use that file to install the same software on another machine. And I might be a bit biased, but I really like this feature, so let me show you how it works.
Within Windows Package Manager installed on your machine open your favourite command shell, I like Windows Terminal.
Enter the command:
winget export -o nameoflist.json
This will export a list of software that is installed on your machine to a file location of your choosing. The file will be a JSON file.
Windows Package Manager export command
Windows Package Manager export list
As you can see from the output file picture above Windows Package Manager lists out each of the software that’s installed.
You do have another option when exporting the list. You can use this command:
Now you can see from the output file the file contains the version of software you have as well, so if you have a need for a specific version to be installed and want to take a note of that you can.
Editing the output file
Now what happens if you want a specific version of a specific piece of software, but you don’t care about the versions of the other?
Well, you can edit the output file to suit your needs. As I said earlier it’s a JSON file so can be easily edited within something like Visual Studio Code.
Windows Package Manager modify export list
Hopefully, you can see from that short clip, that Intellisense within Visual Studio Code is helping to identify where my syntax is wrong, in this case by leaving trailing commas and accidentally deleting quotation marks I need.
Import onto another machine
Now that we have a list of software that we like to have installed, we can start to use this on other machines.