Reinstalling an OS feels like it should be painful and scary. I’m going to lose files. I’m going to spend hours booting into safe mode and looking for drivers. I’m going to forget some apps. So when my computer got stuck on Windows Update and couldn’t update to the latest version (24H2), I wasn’t excited, but I finally bit the bullet and completely reset the machine. But in keeping with my previous post, I chatted with Copilot first about some ideas to make the process smoother. These aren’t going to be general purpose tips, but if you’re not intimated by a command prompt, I bet this will save you some time.
Before I reset anything, I did my usual application list checks and file backups. But then I did two additional steps.
- Have you learned the glory of winget yet? It lets you install any Windows Store app from the command line. I’ll be honest… I hardly ever installed stuff through the Windows Store, but once I found this app, I was hooked! I regularly reset my machines at work and we have a team script that automatically installs most of the apps that we will need. In my chat with Copilot, I learned that winget is even cooler than I thought: you can export a list of all your installed apps and then import it later! “winget list” will give you a nice table showing all the apps and whether they are in the store or not. “winget export” will dump a json file of all the Windows Store apps on your machine and then you can use “winget import” to reinstall them. If you run the import from an admin command prompt and use “–accept-source-agreements –accept-package-agreements” then the whole thing is silent. I installed 22 apps with a single command!
- Driver installs are much better than they used to be, but I still worry about missing something, especially since I built this PC myself and I can’t just go to a website and download all the drivers for it. But it turns out that you can easily list and back up all your drivers with these three commands. I didn’t test the reinstall part because Windows was able to find everything, but it’s nice to know that I had a backup plan.
- List them all: driverquery /FO LIST /V > C:\DriverList.txt
- Back them up: dism /online /export-driver /destination:C:\DriverBackup
- Reinstall from backup: pnputil /add-driver C:\DriverBackup\*.inf /subdirs /install
Resetting Windows is so easy these days! It’s done right from the settings app and you can choose to refresh or completely wipe and start over. I did the latter since I wasn’t sure exactly what was keeping me from updating. That put me on 23H2 again and I wasn’t immediately being offered 24H2 so I forced it with the Windows 11 Installation Assistant.
I still had to reinstall a bunch of apps that weren’t in the Windows store, but everything up to that point was a breeze and went amazingly quickly. Of course, having a solid backup strategy is critical to an operation like this. I knew that I had multiple copies of all my data in case anything went wrong. Using OneDrive to backup your Desktop, Photos, Documents, etc is a great way to do have this happen by default.
So I don’t know who this post will benefit, but I wanted to celebrate how easy this reinstall was!