Windows Setup & Chocolatey

Wouldn't It Be Nice 🍫

I’ve installed many fresh copies of Windows; floppies, CDs, DVDs, USBs and recovery partitions. I’m at the point now where I can have the whole OS rebuilt, my preferences set and software installed (internet willing 🙏), within a few hours. A backup of my user profile, the latest Windows ISO, a bootable USB using Rufus and I’m ready to wipe the drive clean.

Setting up a new Windows environment isn’t hard, it’s repetitive.

…change UAC settings so it doesn’t dim the screen
…change time format to 24-hour
…set explorer to show hidden files, check boxes, extensions
…dark mode all the things
…install favourite apps
yada, yada, yada 😒

I wanted to achieve two goals when automating my Windows setup. First, configure all those personal preferences to make it feel homely. Second, install my favourite applications.

Underneath the wonderful Windows GUI, it’s Registry entries all the way down. I spent a few hours Googling "{setting name} + registry" to find the appropriate keys and values I needed to modify. I stuffed all that into a CSV file and created a PowerShell script to suck it in and make it so.

Installing software historically involved visiting a bunch of websites, downloading executables, clicking through dialogues, abruptly followed by screams of fear as the realisation dawns. You forgot to uncheck a box, several toolbars have been installed and there’s an email waiting in your inbox purporting to be from a Nigerian prince 👑😱.

Wouldn’t it be nice if there was a better way? Enter Chocolatey, the answer to package management on Windows. Choco is a community run open source project that provides an easy and secure way to manage Windows software (think APT or yum for Linux). Choco is built upon the same technology as NuGet and conveniently handles software install, uninstall and upgrade. You can browse the public list of available Choco packages here.

Another hour or so later searching for packages, I had integrated another CSV file into my PowerShell script.

Next time when setting up a fresh Windows install, I merely navigate to my GitHub repo, download the zip and run the script. Within moments the taskbar will be displaying the time down to the second and the installation of Everything will have begun.

comments powered by Disqus