Chocolatey - Paketverwaltung für Windows

Letzte Änderung: 04.08.2017

Eine der größten Vorteile von Linux-Distributionen ist das Softwaremanagement über eine Paketverwaltung. Da Windows das nicht von Haus aus bietet, ist die Pflege der installierten Software unter Windows nerv- und zeitraubend. Allerdings gibt es die Software Chocolatey, die eine Paketverwaltung auch für Windows bietet.

Installation

  1. PowerShell als Admin starten
  2. Set-ExecutionPolicy RemoteSigned
  3. (iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')))
    Es schadet nicht, sich dieses Skript zuvor genauer anzuschauen. Immerhin lädt man hier etwas aus dem Internet und führt es als Admin aus!
  4. PowerShell neu starten
  5. Prüfen, ob es geklappt hat: choco /? sollte eine Liste aller Parameter ausgeben
  6. Viel gibt es nicht zu konfigurieren, aber die ganzen Optionen sind mit choco config ersichtlich. Soll eine Option geändert werden, geht das beispielsweise so: choco config set cachelocation D:\Cache\Chocolatey
  7. Optional kann man noch eine GUI installieren, wenn man das denn wünscht: choco install -y chocolateygui

Nutzung

  • Suche nach einem Paket: choco search vim
  • Installation eines Pakets: choco install vim
  • Prüfen, ob es veraltete Paket gibt: choco outdated
  • Aktualisierung aller lokal installierten Pakete: cup all
  • Aktualisierung eines einzelnen Pakets: cup vim
  • Liste aller lokal installierten Pakete ausgeben: choco list -l

Beispiele

# Liste aller installierten Pakete
$ choco list -l
Chocolatey v0.10.7
7zip 16.4.0.20170506
7zip.commandline 16.02.0.20170209
7zip.install 16.4.0.20170506
7zip.portable 16.04
autoruns 13.71
bind-toolsonly 9.10.3
blender 2.78.2
chocolatey 0.10.7
chocolatey-core.extension 1.3.1
chocolatey-uninstall.extension 1.2.0
chocolatey-windowsupdate.extension 1.0.2
clementine 1.3.1.20170212
cpu-z 1.80
cpu-z.install 1.80
crystaldiskinfo 7.0.5
crystaldiskinfo.portable 7.0.5
DotNet4.0 4.0.30319.20141222
DotNet4.5.2 4.5.2.20140902
everything 1.4.1877
filezilla 3.26.2
gimp 2.8.22
git 2.13.3
git.install 2.13.3
GoogleChrome 60.0.3112.78
greenshot 1.2.9.129
gsmartcontrol 0.8.7
handbrake 0.10.5.20160304
handbrake.install 0.10.5.20160304
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20170509
KB3033929 1.0.3
KB3035131 1.0.1
keepass 2.36
keepass.install 2.36
libreoffice 5.4.0
markdownpad2 2.3
md5sums 1.2
meld 3.16.2
mm-choco.extension 0.0.4.1
mpc-hc 1.7.13
myphoneexplorer 1.8.8
nextcloud-client 2.3.1.8
notepadplusplus 7.4.2
notepadplusplus.install 7.4.2
openhardwaremonitor 0.8.0
Opera 46.0.2597.57
pidgin 2.12.0
procexp 16.21.0.20170716
procmon 3.33.0.20170716
pstools 1.2012.04.12
putty 0.70
putty.portable 0.70
python 3.6.2
python2 2.7.13
python3 3.6.2
RobotoFonts 4.0.0.1
rufus 2.16
rufus.install 2.14
spacesniffer 1.3.0.1
speccy 1.31.732
sqlitebrowser 3.9.1
sumatrapdf 3.1.2
sumatrapdf.commandline 3.1.2
thunderbird 52.2.1
tortoisesvn 1.9.6.27867
vcredist140 14.10.25017.0
vcredist2005 8.1.0.20160118
vcredist2008 9.0.30729.6161
vcredist2010 10.0.40219.2
vcredist2012 11.0.61031
vcredist2013 12.0.30501.20150616
vcredist2015 14.0.24215.20170201
vim 8.0.604
virtualbox 5.1.24
vivaldi 1.10.867.38
vlc 2.2.6
windirstat 1.1.2.20161210
winscp 5.9.6
winscp.install 5.9.6
wireshark 2.4.0
zim 0.65
82 packages installed.

# Alle Pakete ohne weitere Nachfragen aktualisieren
$ cup all -y
Chocolatey v0.10.7
Upgrading the following packages:
all
By upgrading you accept licenses for the packages.
7zip v16.4.0.20170506 is the latest version available based on your source(s).
7zip.commandline v16.02.0.20170209 is the latest version available based on your source(s).
7zip.install v16.4.0.20170506 is the latest version available based on your source(s).
7zip.portable v16.04 is the latest version available based on your source(s).
autoruns v13.71 is the latest version available based on your source(s).
bind-toolsonly v9.10.3 is the latest version available based on your source(s).
blender v2.78.2 is the latest version available based on your source(s).
chocolatey v0.10.7 is the latest version available based on your source(s).
chocolatey-core.extension v1.3.1 is the latest version available based on your source(s).
chocolatey-uninstall.extension v1.2.0 is the latest version available based on your source(s).
chocolatey-windowsupdate.extension v1.0.2 is the latest version available based on your source(s).
clementine v1.3.1.20170212 is the latest version available based on your source(s).
cpu-z v1.80 is the latest version available based on your source(s).
cpu-z.install v1.80 is the latest version available based on your source(s).

You have crystaldiskinfo v7.0.5 installed. Version 7.1.0 is available based on your source(s).
Progress: Downloading crystaldiskinfo.portable 7.1.0... 100%
Progress: Downloading crystaldiskinfo 7.1.0... 100%

crystaldiskinfo.portable v7.1.0 [Approved]
crystaldiskinfo.portable package files upgrade completed. Performing other installation steps.
Downloading crystaldiskinfo.portable
  from 'https://en.osdn.net/dl/crystaldiskinfo/CrystalDiskInfo7_1_0.zip'
Progress: 100% - Completed download of C:\Users\bheil\AppData\Local\Temp\chocolatey\crystaldiskinfo.portable\7.1.0\Cryst
alDiskInfo7_1_0.zip (4.69 MB).
Download of CrystalDiskInfo7_1_0.zip (4.69 MB) completed.
Hashes match.
Extracting C:\Users\bheil\AppData\Local\Temp\chocolatey\crystaldiskinfo.portable\7.1.0\CrystalDiskInfo7_1_0.zip to C:\Pr
ogramData\chocolatey\lib\crystaldiskinfo.portable\tools...
C:\ProgramData\chocolatey\lib\crystaldiskinfo.portable\tools
 ShimGen has successfully created a shim for DiskInfo32.exe
 ShimGen has successfully created a shim for DiskInfo64.exe
 The upgrade of crystaldiskinfo.portable was successful.
  Software installed to 'C:\ProgramData\chocolatey\lib\crystaldiskinfo.portable\tools'

crystaldiskinfo v7.1.0 [Approved]
crystaldiskinfo package files upgrade completed. Performing other installation steps.
 The upgrade of crystaldiskinfo was successful.
  Software install location not explicitly set, could be in package or
  default install location if installer.
crystaldiskinfo.portable v7.1.0 is the latest version available based on your source(s).
DotNet4.0 v4.0.30319.20141222 is the latest version available based on your source(s).
DotNet4.5.2 v4.5.2.20140902 is the latest version available based on your source(s).
everything v1.4.1877 is the latest version available based on your source(s).
filezilla v3.26.2 is the latest version available based on your source(s).
gimp v2.8.22 is the latest version available based on your source(s).
git v2.13.3 is the latest version available based on your source(s).
git.install v2.13.3 is the latest version available based on your source(s).

You have GoogleChrome v60.0.3112.78 installed. Version 60.0.3112.90 is available based on your source(s).
Progress: Downloading GoogleChrome 60.0.3112.90... 100%

GoogleChrome v60.0.3112.90 [Approved]
googlechrome package files upgrade completed. Performing other installation steps.
Downloading googlechrome 64 bit
  from 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise64.msi'
Progress: 100% - Completed download of C:\Users\bheil\AppData\Local\Temp\chocolatey\GoogleChrome\60.0.3112.90\googlechro
mestandaloneenterprise64.msi (48.42 MB).
Download of googlechromestandaloneenterprise64.msi (48.42 MB) completed.
Hashes match.
Installing googlechrome...
googlechrome has been installed.
  googlechrome may be able to be automatically uninstalled.
 The upgrade of googlechrome was successful.
  Software installed as 'MSI', install location is likely default.
greenshot v1.2.9.129 is the latest version available based on your source(s).
gsmartcontrol v0.8.7 is the latest version available based on your source(s).
handbrake v0.10.5.20160304 is the latest version available based on your source(s).
handbrake.install v0.10.5.20160304 is the latest version available based on your source(s).
KB2919355 v1.0.20160915 is the latest version available based on your source(s).
KB2919442 v1.0.20160915 is the latest version available based on your source(s).
KB2999226 v1.0.20170509 is the latest version available based on your source(s).
KB3033929 v1.0.3 is the latest version available based on your source(s).
KB3035131 v1.0.1 is the latest version available based on your source(s).
keepass v2.36 is the latest version available based on your source(s).
keepass.install v2.36 is the latest version available based on your source(s).
libreoffice v5.4.0 is the latest version available based on your source(s).
markdownpad2 v2.3 is the latest version available based on your source(s).
md5sums v1.2 is the latest version available based on your source(s).
meld v3.16.2 is the latest version available based on your source(s).
mm-choco.extension v0.0.4.1 is the latest version available based on your source(s).
mpc-hc v1.7.13 is the latest version available based on your source(s).
myphoneexplorer v1.8.8 is the latest version available based on your source(s).

You have nextcloud-client v2.3.1.8 installed. Version 2.3.2.1 is available based on your source(s).
Progress: Downloading nextcloud-client 2.3.2.1... 100%

nextcloud-client v2.3.2.1 [Approved]
nextcloud-client package files upgrade completed. Performing other installation steps.
Downloading nextcloud-client
  from 'https://download.nextcloud.com/desktop/releases/Windows/Nextcloud-2.3.2.1-setup.exe'
Progress: 100% - Completed download of C:\Users\bheil\AppData\Local\Temp\chocolatey\nextcloud-client\2.3.2.1\Nextcloud-2
.3.2.1-setup.exe (38.11 MB).
Download of Nextcloud-2.3.2.1-setup.exe (38.11 MB) completed.
Hashes match.
Installing nextcloud-client...
nextcloud-client has been installed.
  nextcloud-client may be able to be automatically uninstalled.
 The upgrade of nextcloud-client was successful.
  Software installed to 'C:\Program Files (x86)\Nextcloud'
notepadplusplus v7.4.2 is the latest version available based on your source(s).
notepadplusplus.install v7.4.2 is the latest version available based on your source(s).
openhardwaremonitor v0.8.0 is the latest version available based on your source(s).
Opera v46.0.2597.57 is the latest version available based on your source(s).
pidgin v2.12.0 is the latest version available based on your source(s).
procexp v16.21.0.20170716 is the latest version available based on your source(s).
procmon v3.33.0.20170716 is the latest version available based on your source(s).
pstools v1.2012.04.12 is the latest version available based on your source(s).
putty v0.70 is the latest version available based on your source(s).
putty.portable v0.70 is the latest version available based on your source(s).
python v3.6.2 is the latest version available based on your source(s).
python2 v2.7.13 is the latest version available based on your source(s).
python3 v3.6.2 is the latest version available based on your source(s).
RobotoFonts v4.0.0.1 is the latest version available based on your source(s).
rufus v2.16 is the latest version available based on your source(s).
rufus.install v2.14 is the latest version available based on your source(s).
spacesniffer v1.3.0.1 is the latest version available based on your source(s).
speccy v1.31.732 is the latest version available based on your source(s).
sqlitebrowser v3.9.1 is the latest version available based on your source(s).
sumatrapdf v3.1.2 is the latest version available based on your source(s).
sumatrapdf.commandline v3.1.2 is the latest version available based on your source(s).
thunderbird v52.2.1 is the latest version available based on your source(s).
tortoisesvn v1.9.6.27867 is the latest version available based on your source(s).
vcredist140 v14.10.25017.0 is the latest version available based on your source(s).
vcredist2005 v8.1.0.20160118 is the latest version available based on your source(s).
vcredist2008 v9.0.30729.6161 is the latest version available based on your source(s).
vcredist2010 v10.0.40219.2 is the latest version available based on your source(s).
vcredist2012 v11.0.61031 is the latest version available based on your source(s).
vcredist2013 v12.0.30501.20150616 is the latest version available based on your source(s).
vcredist2015 v14.0.24215.20170201 is the latest version available based on your source(s).
vim v8.0.604 is the latest version available based on your source(s).

You have virtualbox v5.1.24 installed. Version 5.1.26 is available based on your source(s).
virtualbox is not running
Progress: Downloading virtualbox 5.1.26... 100%

virtualbox v5.1.26 [Approved]
virtualbox package files upgrade completed. Performing other installation steps.
File appears to be downloaded already. Verifying with package checksum to determine if it needs to be redownloaded.
Hashes match.
Hashes match.
Installing virtualbox...
virtualbox has been installed.
Installing extension pack
Downloading virtualbox-extensionpack 64 bit
  from 'http://download.virtualbox.org/virtualbox/5.1.26/Oracle_VM_VirtualBox_Extension_Pack-5.1.26.vbox-extpack'
WARNING: C:\Users\bheil\AppData\Local\Temp\chocolatey\virtualbox\5.1.26\Oracle_VM_VirtualBox_Extension_Pack-5.1.26.vbox-
extpack is of content type text/plain
Progress: 100% - Completed download of C:\Users\bheil\AppData\Local\Temp\chocolatey\virtualbox\5.1.26\Oracle_VM_VirtualB
ox_Extension_Pack-5.1.26.vbox-extpack (18.72 MB).
Download of Oracle_VM_VirtualBox_Extension_Pack-5.1.26.vbox-extpack (18.72 MB) completed.
Hashes match.
C:\Users\bheil\AppData\Local\Temp\chocolatey\virtualbox\5.1.26\Oracle_VM_VirtualBox_Extension_Pack-5.1.26.vbox-extpack
VirtualBox Personal Use and Evaluation License (PUEL)

License version 9, 17 November 2016
[...]

Do you agree to these license terms and conditions (y/n)?
License accepted. For batch installaltion add
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
--accept-license=715c7246dc0f779ceab39446812362b2f9bf64a55ed5d3a905f053cfab36da9e
to the VBoxManage command line.

Successfully installed "Oracle VM VirtualBox Extension Pack".
Adding to PATH if needed
virtualbox installed to 'C:\Program Files\Oracle\VirtualBox'
virtualbox registered as vbox
 The upgrade of virtualbox was successful.
  Software installed as 'EXE', install location is likely default.
vivaldi v1.10.867.38 is the latest version available based on your source(s).
vlc v2.2.6 is the latest version available based on your source(s).
windirstat v1.1.2.20161210 is the latest version available based on your source(s).
winscp v5.9.6 is the latest version available based on your source(s).
winscp.install v5.9.6 is the latest version available based on your source(s).
wireshark v2.4.0 is the latest version available based on your source(s).
zim v0.65 is the latest version available based on your source(s).

Chocolatey upgraded 5/82 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Upgraded:
 - googlechrome v60.0.3112.90
 - crystaldiskinfo v7.1.0
 - crystaldiskinfo.portable v7.1.0
 - virtualbox v5.1.26
 - nextcloud-client v2.3.2.1
$