You should get to know Chocolatey, for Windows

As you see all around you, pretty much every technology has transitioned to this concept of a “package manager”. That is, some sort of scheme (tools and techniques) to install pre-made components into your technology. We see it with Nuget, NPM, Bower, Ruby Gems, CRAN, apt-get, yum, RPM, etc, etc…

Well, as you might know – PowerShell has a package manager now called OneGet. However, wouldn’t it be cool if there was a package manager for Windows? Like, where you could install all sorts of open-source applications by just running a command? In Linux, you can use “apt-get”, Yum, or RPM – depending on your distribution, but up until now, there hasn’t been an equivalent for Windows.

Setting up a new machine:
I recently re-set up my main sandbox virtual machine. This is where I run Windows 10, Visual Studio 2015 RC, SQL Server 2014, etc. Well, what about all those other little programs? I can never remember what I need – and it’s a pain to find everything!

Well, try this! Go to this website:

https://chocolatey.org/packages

and look for interesting things to install. For example, on my sandbox, I want:

  • All the browsers, for testing: Chrome, Firefox, Opera, Maxthon, other versions of IE
  • Some way to work with .zip files – 7zip
  • Some way to do FTP – FileZilla
  • Some good editors
  • Some way to open MS Office files, or at least Excel – hey what about LibreOffice (plus no dealing with MS Office serial numbers!)
  • The SysInternals Suite.
  • Etc, etc, etc…

to do this, open a Command Prompt (right click on the icon and Run As Administrator):

image

then, taking right from the main page: https://chocolatey.org/ run the command it says, this installs Chocolately:

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

and you’ll see a bunch of stuff scroll by:

image

Now, you can install packages with a command like:

choco install <package-name>

If you don’t know the name of the package, you can guess and do a partial search, for example I might search for the “maxthon” web browser, or for any packages that have”zip” in the name – with “choco list maxthon” and “choco list zip”, respectively:

image

Then, when you install packages, you see a nice color-coded output, like this:

image

How I use this:
So back to my original point – what do I do when I set up my sandbox developer workstation? I kickoff the install of a bunch of things. This runs for like :15 minutes, quietly in a window – and when it’s done – all of these products are installed. Here is my current list (the –y makes it so it will answer yes, and silently install):

choco install googlechrome -y
choco install firefox -y
choco install opera -y
choco install ie11 -y
choco install git -y
choco install notepadplusplus -y
choco install 7zip -y
choco install chocolateygui -y
choco install sysinternals -y
choco install filezilla -y
choco install mysql.workbench -y
choco install fiddler4 -y
choco install libreoffice -y
choco install wget -y
choco install curl  -y
choco install pdfcreator -y
choco install calibre -y
choco install conemu -y
choco install sublimetext3  -y

I just copy these and paste them into an Administrator command-line window and let it run!

Bottom line:
If you are looking for a package manager to install Windows utilities – or if you want to create a package, Chocolately has risen to pretty much be the de facto winner for this functionality. So, if you’re not familiar with it – dig in, it’s pretty easy and very powerful!

Posted in Computers and Internet, Development Tools, General, Infrastructure, New Technology, Open Source, Organization will set you free, PowerShell, Professional Development, Uncategorized, Windows
One comment on “You should get to know Chocolatey, for Windows
  1. […] a previous post, I talked about Chocolatey on Windows. That is a package manager where you can install all your typical, small applications at-once. […]

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives
Categories

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 2 other followers

%d bloggers like this: