Since Microsoft went to Windows as a service, so since Windows 10, I fully re-install my development machine, a Surface Book, with each main release of Windows.
As I hate to lose time, I searched a way to automate it, so that it is fast, repeatable and does the work, not me.
TL; DR; (Spoiler) Install your development environment tools with one click on a hyperlink!
Since long, I am using Chocolatey, the package manager for Windows, to install some of my tools. I even created an installation of Git Diff Margin, my Visual Studio extension displaying live changes of the currently edited file on Visual Studio 2012+ margin and scrollbar. Note to me, update the package to the latest version of Git Diff Margin.
That’s already a fantastic step forward, you type one command line like this
choco install git -y
and you get Git installed without doing anything, except typing the command! No need to search on which website you need to download the software, download it, maybe extract it to finally be able to run it and click next-next-next (eh Cédric). Just one command on the command line and you are done. Great, no?
But after re-installing my machine this way a first time and a second time I wanted more automation. So I decided to dig deeper in a tool I found also a long time ago but never took the time to use; Boxstarter: repeatable, reboot resilient Windows environment installations made easy using Chocolatey packages. Seems to exactly match what I wanted to achieve for the next level of automation.
So I searched some examples on Github and cooked my own script which I open sourced and called it Cacao. A nice name, no :D?
So now, when I have installed my Windows 10 machine from scratch I just need to install Boxstarter, download my script and launch it! A very nice step forward indeed.
Wait can’t we do better, there is still quite some things to do by hand, and you need to remember those things!
What do you think of being able to click on a hyperlink, click on OK then everything would be installed for you by little pixies while you do something else? That would be just fantastic. The best is that it is possible!
You can see such a link on Cacao README.md file search for the text ‘Install my tools!’.
This link is built as following
So easy and so powerful. You append the hyperlink to the raw URL of your script to an URL which will install Boxstarter, and that does the trick!
So now we are ready to install development environment tools by one click on a hyperlink! What do you want more?
During the Build2018 Microsoft got interested in that topic, which is great, and you can read about it in their blog post “Join us for a hot cup o Chocolatey!“ and on their Github repo windows-dev-box-setup-scripts.
One fantastic side effect is that now I can also update all my tools by running one command
choco upgrade all -y
Like they say, there’s never been a better time to be a developer!