Quick install of tools using Chocolatey

By Dries Marckmann
March 21, 2013

I got my new laptop today… decided to spend an hour or so to get an easy install working. Using Chocolatey (http://chocolatey.org) that should be easy.

It is, but it is not straightforward. You can’t create a simple batchfile like this:

cinst notepadplusplus

cinst fiddler


The command window will exit after installing notepad++.  A quick search revealed what I should have realized up front. Chocolatey uses nuget and therefor we can use a local packages.config file to get and install all packages. So now my script looks like this:

::Ensure we have elevated permissions

@reg add HKLMSoftwareMicrosoftDevDivb3d680166a14e50a8c8e2ed060d8d90 /v Elevated /t REG_DWORD /d 1 /f > nul 2>&1

@if /i “%errorlevel%”==”1” echo Error: elevation required. &exit /b 740

@reg delete HKLMSoftwareMicrosoftDevDivb3d680166a14e50a8c8e2ed060d8d90 /va /f > nul 2>&1


::Install Chocolatey

@powershell -NoProfile -ExecutionPolicy unrestricted -Command “iex ((new-object net.webclient).DownloadString(‘http://chocolatey.org/install.ps1’))” && SET PATH=%PATH%;%systemdrive%chocolateybin

::Start installing packages

cinst packages.config


And here is the contents of my packages.config:

<?xml version=”1.0″ encoding=”utf-8″?>


    <package id=”VirtualCloneDrive” />

     <package id=”notepadplusplus” />

    <package id=”FoxitReader” />

    <package id=”imgburn” />

    <package id=”7zip” />

    <package id=”ilspy” />

    <package id=”tortoisegit” />

    <package id=”tortoisesvn” />

    <package id=”tortoisehg” />

    <package id=”expresso” />

    <package id=”virtualbox” />

    <package id=”KeePass” />

    <package id=”Paint.NET” />

    <package id=”rabbitmq” />

    <package id=”steam” />

    <package id=”vlc” />

    <package id=”fiddler” />

    <package id=”baretail” />

    <package id=”linqpad4″ />

    <package id=”tweetdeck” />

    <package id=”teamviewer” />

    <package id=”Teamspeak3″ />

    <package id=”skype” />

    <package id=”SkyDrive” />

    <package id=”ransack” />



So I’m quickly set up to do some happy coding!

Comments: 1

  1. Eugene says:

    This is also good.
    The software works well, Ammyy Admin doesn’t require installation or specific config, works behind gateways NAT as well as within one LAN.

Leave a Reply

Your email address will not be published. Required fields are marked *