17

I am about to reinstall my Windows 10 pc, and would like to use Chocolatey for a lot of applications.

Can I just issue one command to Chocolatey and let it deal with the dependencies and installation order, or is it better to do one application at a time? Could I do a single:

choco install mobaxterm jdk8 intellijidea-community virtualbox vlc ...

or is it better to issue one command at a time?

1
  • 3
    While you can certainly do this and it will work fine, the answer about using a packages.config will give you the greatest flexibility. – ferventcoder Oct 7 '16 at 20:02
18

Take a look at the documentation at https://docs.chocolatey.org/en-us/choco/commands/install (or type choco install -? at the command line (you may want to pipe that to more or less).

You certainly can issue a list of packages at once and it will work fine.

Consider however that a packages.config file will give you a bit more flexibility in passing options and switches for each packages. Here is the format:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="apackage" />
  <package id="anotherPackage" version="1.1" />
  <package id="chocolateytestpackage" version="0.1" source="somelocation" />
  <package id="alloptions" version="0.1.1"
           source="https://somewhere/api/v2/" installArguments=""
           packageParameters="" forceX86="false" allowMultipleVersions="false"
           ignoreDependencies="false"
           />
</packages>

This will give you the ability to install multiple packages from one command.

1
  • Why XML and not JSON or YAML ... This is so 1980s ;) – JahMyst Apr 22 '20 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.