Chocolatey – gestionnaire de package pour Windows

Dernièrement j’ai découvert Chocolatey, il s’agit d’un gestionnaire de paquets pour Windows en ligne de commande. Ces outils surtout connus dans le monde Unix, permettent de gérer de manière centralisée l’installation, la mise à jour et la suppression des logiciels sur un système informatique. Je me souviens ces années avec les commandes apt-get de Debian, pacman d’Archlinux, emerge de Gentoo.

Version actuelle : 0.9.8.27

1996 paquets dans le dépôt (repository)

Pré-requis:

  • Windows XP/Vista/7/8/2003/2008
  • .NET Framework 4.0
  • PowerShell 2.0

Installation de Chocolatey dans une invite de commande en mode admin

Ou dans une console powershell en mode admin

<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-powershell" data-lang="powershell">iex ((new-object net.webclient).DownloadString(<span style="color:#e6db74">&#39;https://chocolatey.org/install.ps1&#39;</span>))</code></pre></div>

**Rechercher un package**

<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-plain" data-lang="plain">**Installer un package**

&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;**Installer un package dans un autre repertoire que celui par défaut**

&amp;lt;div class=&amp;#34;highlight&amp;#34;&amp;gt;&amp;lt;pre style=&amp;#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&amp;#34;&amp;gt;&amp;lt;code class=&amp;#34;language-plain&amp;#34; data-lang=&amp;#34;plain&amp;#34;&amp;gt;[&amp;amp;lt;img class=&amp;amp;#34;alignnone size-full wp-image-163&amp;amp;#34; src=&amp;amp;#34;/wp-content/uploads/2014/07/chocolatey-1.png?fit=677%2C618&amp;amp;#34; alt=&amp;amp;#34;Chocolatey-1&amp;amp;#34; srcset=&amp;amp;#34;/wp-content/uploads/2014/07/chocolatey-1.png?resize=300%2C274 300w, /wp-content/uploads/2014/07/chocolatey-1.png?w=677 677w&amp;amp;#34; sizes=&amp;amp;#34;(max-width: 677px) 100vw, 677px&amp;amp;#34; data-recalc-dims=&amp;amp;#34;1&amp;amp;#34; /&amp;amp;gt;][1]

**Mettre à jour un package**

&amp;amp;lt;div class=&amp;amp;#34;highlight&amp;amp;#34;&amp;amp;gt;&amp;amp;lt;pre style=&amp;amp;#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&amp;amp;#34;&amp;amp;gt;&amp;amp;lt;code class=&amp;amp;#34;language-plain&amp;amp;#34; data-lang=&amp;amp;#34;plain&amp;amp;#34;&amp;amp;gt;**Mettre à jour tous les packages**

&amp;amp;amp;lt;div class=&amp;amp;amp;#34;highlight&amp;amp;amp;#34;&amp;amp;amp;gt;&amp;amp;amp;lt;pre style=&amp;amp;amp;#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&amp;amp;amp;#34;&amp;amp;amp;gt;&amp;amp;amp;lt;code class=&amp;amp;amp;#34;language-plain&amp;amp;amp;#34; data-lang=&amp;amp;amp;#34;plain&amp;amp;amp;#34;&amp;amp;amp;gt;**Supprimer un package**

&amp;amp;amp;amp;lt;div class=&amp;amp;amp;amp;#34;highlight&amp;amp;amp;amp;#34;&amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;pre style=&amp;amp;amp;amp;#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&amp;amp;amp;amp;#34;&amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;code class=&amp;amp;amp;amp;#34;language-plain&amp;amp;amp;amp;#34; data-lang=&amp;amp;amp;amp;#34;plain&amp;amp;amp;amp;#34;&amp;amp;amp;amp;gt;[&amp;amp;amp;amp;amp;lt;img class=&amp;amp;amp;amp;amp;#34;alignnone size-full wp-image-164&amp;amp;amp;amp;amp;#34; src=&amp;amp;amp;amp;amp;#34;/wp-content/uploads/2014/07/chocolatey-2.png?fit=677%2C342&amp;amp;amp;amp;amp;#34; alt=&amp;amp;amp;amp;amp;#34;Chocolatey-2&amp;amp;amp;amp;amp;#34; srcset=&amp;amp;amp;amp;amp;#34;/wp-content/uploads/2014/07/chocolatey-2.png?resize=300%2C152 300w, /wp-content/uploads/2014/07/chocolatey-2.png?w=677 677w&amp;amp;amp;amp;amp;#34; sizes=&amp;amp;amp;amp;amp;#34;(max-width: 677px) 100vw, 677px&amp;amp;amp;amp;amp;#34; data-recalc-dims=&amp;amp;amp;amp;amp;#34;1&amp;amp;amp;amp;amp;#34; /&amp;amp;amp;amp;amp;gt;][2]

**Mettre à jour Chocolatey**

&amp;amp;amp;amp;amp;lt;div class=&amp;amp;amp;amp;amp;#34;highlight&amp;amp;amp;amp;amp;#34;&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;pre style=&amp;amp;amp;amp;amp;#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&amp;amp;amp;amp;amp;#34;&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;code class=&amp;amp;amp;amp;amp;#34;language-plain&amp;amp;amp;amp;amp;#34; data-lang=&amp;amp;amp;amp;amp;#34;plain&amp;amp;amp;amp;amp;#34;&amp;amp;amp;amp;amp;gt;**Supprimer Chocolatey**

Supprimer le répertoire de Chocolatey (par défaut : C:ProgramDatachocolatey) et la variable d’environnement ChocolateyInstall. La base de registre ne comporte pas d’information.

Si vous souhaitez conserver une interface graphique, **ChocolateyGUI** répond à vos attentes.

[&amp;amp;amp;amp;amp;amp;lt;img class=&amp;amp;amp;amp;amp;amp;#34;alignnone size-full wp-image-162&amp;amp;amp;amp;amp;amp;#34; src=&amp;amp;amp;amp;amp;amp;#34;/wp-content/uploads/2014/07/chocolateygui-1.png?fit=890%2C514&amp;amp;amp;amp;amp;amp;#34; alt=&amp;amp;amp;amp;amp;amp;#34;ChocolateyGUI-1&amp;amp;amp;amp;amp;amp;#34; srcset=&amp;amp;amp;amp;amp;amp;#34;/wp-content/uploads/2014/07/chocolateygui-1.png?resize=1024%2C592 1024w, /wp-content/uploads/2014/07/chocolateygui-1.png?w=1037 1037w&amp;amp;amp;amp;amp;amp;#34; sizes=&amp;amp;amp;amp;amp;amp;#34;(max-width: 890px) 100vw, 890px&amp;amp;amp;amp;amp;amp;#34; data-recalc-dims=&amp;amp;amp;amp;amp;amp;#34;1&amp;amp;amp;amp;amp;amp;#34; /&amp;amp;amp;amp;amp;amp;gt;][3]

Après un survol rapide, j’ai trouvé un outil intéressant et pratique, qui permet de gagner du temps sur des taches à peu de valeur ajoutée.

**Références :**

[Chocolatey.org][4]

[List of software package management systems – Windows][5]

[Scott Hanselman – Is the Windows user ready for apt-get?][6]

 [1]: /wp-content/uploads/2014/07/chocolatey-1.png
 [2]: /wp-content/uploads/2014/07/chocolatey-2.png
 [3]: /wp-content/uploads/2014/07/chocolateygui-1.png
 [4]: http://chocolatey.org/
 [5]: http://en.wikipedia.org/wiki/List_of_software_package_management_systems#Microsoft_Windows
 [6]: //www.hanselman.com/blog/IsTheWindowsUserReadyForAptget.aspx&amp;amp;amp;amp;amp;lt;/code&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/pre&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;/code&amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;/pre&amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;gt;&amp;amp;amp;lt;/code&amp;amp;amp;gt;&amp;amp;amp;lt;/pre&amp;amp;amp;gt;&amp;amp;amp;lt;/div&amp;amp;amp;gt;&amp;amp;lt;/code&amp;amp;gt;&amp;amp;lt;/pre&amp;amp;gt;&amp;amp;lt;/div&amp;amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</code></pre></div>