2019-10-03

Using Chocolatey to install your favorite software


This is a follow-up to one of my previous posts:
Chocolatey is like a package manager, but for Windows; a bit like the famous `apt-get` or `aptitude` for some GNU/Linux distros (...) I have created a curated list of my favorite ones; the ones I would install right away on a new computer, whether it is for work or even for home computing.

Therefore, to run any of the commands listed below, you will first need to install Chocolatey itself, which can be easily done with a simple command, so make sure you first check this post:

Install both Chocolatey and OpenSSH with SSHD in one Copy-Paste in Powershell







SUBSEQUENT CALLS


After completion, you may invoke commands such as:

choco install -y vcredist2015
choco install -y --ignore-checksums linkshellextension

choco install -y 7zip
choco install -y git --version 2.21.0

choco install -y openvpn

choco install -y keepass
choco install -y notepadplusplus

choco install -y firefox
choco install -y googlechrome

choco install -y cherrytree --version 0.38.8
choco install -y guidgen-console
choco install -y lightshot
choco install -y synctrayzor
choco install -y winmerge

# java runtime environment
choco install -y jre8

# autoit minimum version: 3.3.8.1
# (autoit 3.3.6.1 not available via chocolatey)
choco install -y autoit --version 3.3.14.5

# scite4autoit3 minimum version: 3.5.4
# (scite4autoit3 3.2.0 not available via chocolatey)
choco install -y scite4autoit3 --version 19.102.1901.001






UNUSED


# git-lfs is already included in the main Git installer
# (this is true as of early 2019)
choco install -y git-lfs

# syncthing is already part of synctrayzor
choco install -y syncthing

# veracrypt competes with BitLocker on Windows, which works fine
choco install -y veracrypt

# As of May 2019, git-credential-manager-for-windows
does not seem to be automatically added to the path!
# However this might not be a big deal since it seems
# to have been included into the main Git installer.
choco install -y git-credential-manager-for-windows

# the winbtrfs driver does not work for me
# (but that has nothing to do with Chocolatey)
choco install -y winbtrfs






DEFECTS


# As of 2019-05-10, choco installs older v18.2.1 of smartgit,
# which causes problems because we are forced to upgrade as
# soon as it is installed
choco install -y smartgit






OTHER COMMANDS: "CHOCO SEARCH"




If you want to check if an application is included to the Chocolatey distribution service, or if you want to know its exact name, you may use the "choco search" command.







OTHER COMMANDS: "CINST"






An even faster way to call for an installation of a piece of software is to use "cinst" instead of "choco install".

Also, according to the help instructions, it should be possible to specify multiple application after the "choco install/cinst" command.

So we can therefore condense the previous list of calls into on single command (although I wrote on multiple lines and escaped using the backtick character, we should be able to copy-paste it just like that):

Optional:
choco feature enable -n allowGlobalConfirmation;   


Default base install v1.0.1910.0:
cinst -y tightvnc; `
 `
cinst -y keepass; `
cinst -y firefox; `
cinst -y notepadplusplus; `
 `
cinst -y lightshot; `
cinst -y --version 0.38.8 cherrytree; `
 `
cinst -y 7zip; `
cinst -y vcredist2015; `
cinst -y --ignore-checksums linkshellextension; `
cinst -y googlechrome; `
 `
cinst -y git; `
cinst -y jre8; `
cinst -y openvpn; `
cinst -y winmerge; `
cinst -y guidgen-console; `
cinst -y --version 3.3.14.5 autoit; `
cinst -y --version 19.102.1901.001 scite4autoit3; `
 `
cinst -y synctrayzor; `
 `
;


REMARK #1: Some (generic) lists may include an install instruction multiple times, usually at the beginning or the end of the script, this is on purpose. Lists like this can have multiple purposes and can be partially copy-pasted if we're only interested in a subset of the list. And running the same install request multiple time will only cause it to be ignored (unless the "--force" parameter was used, which is not the case).


REMARK #2: Also some pieces of software require very specific configuration, such as a VNC server, and we're better off running them separately, or at the very beginning and letting the rest of the automated install to carry on...
- tightvnc


REMARK #3: Some software may not be suitable for being installed on the system disk if it deals with data located on an independent disk of a virtual machine, in which case it's advised to use a portable application which you would install manually:

- synctrayzor


REMARK #4: I personally use my favorite (and most important) software in the form of portable programs, which I update myself, in which case it has to be removed from the default list:

- notepadplusplus, keepass, firefox


Other, ready to paste, multi-line commands such as the one above, can be found at this address:
Choco-based unassisted installs



No comments:

Post a Comment