Chocolatey for Windows

Mmmmm geeky chocolate!

Chocolatey

I have to say I was VERY sceptical of this concept called Chocolatey first. It just didn’t resonate with me. I mean come on we are talking about firing a command shell to install software from the internet without having an opportunity to modify the install behaviour?

Naaaaah!

Even so I simply had to try it once. For the heck of it. Simply because I am a techy, a nerdy geeky cloudy eyed, caffeine gulping, human-ish creature and I must oh must succumb to try everything that is “techy or geeky”.

So I configured Chocolaty following instructions as given here. This is pretty much just firing up a command prompt and executing these commands

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

Once I had Chocolatey configured I messed around a bit and quickly dismissed it. Job done. I tried something, didn’t like it, brushed it under the carpet and moved on. The geek inside me had been placated.

Until today when I decided to undertake a new personal project and decided to back it up using MongoDB. Further in the interest of throwing as much new stuff in the mix that I could I also decided to succumb to give the new Git integration within TFS in the cloud a spin by using the command line tools for Git.

So here I was heading over to my new toy a search engine called DuckDuckGo (that actually is way cooler than the mainstream ones in the sense it doesn’t try to track me down and come over for a cup of tea at my house) to do the usual setup i.e download Mongo, Git etc. when suddenly I remembered Chocolatey. In the interest of saving myself some time I fired up a good old command prompt and took a leap of faith. I randomly typed

cinst mongodb

My screen flashed and in some sort of a Matrix-y style the command prompt window suddenly came to life. It was actually doing stuff! Before I had the chance to say “WTF is going on here” I saw an elevation prompt, I clicked Yes (because that is what you do!) and it was all done!

That’s it! Easy!

One command line was all that it took for the Chocolatey engine to get MongoDB, install and configure it on my laptop.

Next was Git, then SublimeText, CCleaner and finally even some Azure SDK related bits!

I simply cannot believe how easy Chocolatey made it for me to install software which ordinarily would have involved some aspect of search, downloads, EULA acceptance etc. All in all I must have saved over 15 minutes and a whole lot of headache.

Real Cool Stuff

Hooked on (and forgotten Mongo and Git etc.) I started a bit of a research into Chocolatey and soon came across this excellent post by Scott Hanselman. As it turns out Chocolatey can go the extra mile and help you manage Windows features. It can help you configure IIS, manage some more Windows features and even interact with Web Platform Installer via its own command line and get you the software you need!

Here’s the complete Command Line reference on Chocolatey for reference – https://github.com/chocolatey/chocolatey/wiki/CommandsReference

Leave a Comment

Your email address will not be published.