Kaseya Community

Chocolatey (**easy** silent app installation)

  • After trying Ninite and also KSDU and dropping both eventually, we ended up writing our own installers with pretty good results. However, I ran across Chocolatey recently after spotting references to it in Powershell 5.0 documentation.

    http://chocolatey.org/

    It looks pretty cool, and seems solid. 

    Install Chocolatey from an Administrative command prompt: @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

    Now you can install packages, for example Adobe Reader: cinst adobereader

    Or TeamViewer Host: cinst teamviewer.host

    Etc.: cinst Office365HomePremium

    Pretty easy to script in Kaseya.

  • Hi Lothario

    We've been using Ninite for a few years now without any issues really.  Can I ask why you gave up on Ninite? What does Chocolatey do better than Ninite?

    Cheers

    Dave

  • It's free, for one thing

  • Downloaded and tried on our in-house test machines. Works great!

    How did you craft your agent procedure to install chocolatey and then to install those apps we want upgraded?

  • Procedure Chocolatey Install.xml

    Choco Install and Adobe Reader install attached.

    Note that I use SSR.EXE to tidy up results.

  • Procedure MP6000 - Adobe Reader Choco Installer.xml

    Oops, missed  the Reader one.

  • Thank you very much. It is appreciated.

    The Adobe Reader has an error in that if it is already installed, the script does not exit, but rather continues on. Will review for adjustments.

  • Yeah, the jury is out on that one... I let it upgrade if required. It does nothing if it's up to date...

  • you need choco to be installed on all clients first !!

  • Errr... yup.

    I thought that was obvious from my post, and the Chocolatey website :-)

  • @Lothario This is an AWESOME procedure.  However how do you handle additional arguments?  Looking at "Classic Shell/ Classis Start" as an example.

    choco install classic-shell -installArgs ADDLOCAL=ClassicStartMenu

    chocolatey.org/.../classic-shell

  • Hello guys !

    Maybe you didn't notice yet but chocolatey will be in Windows 10,and in PowerShell v5. Take a look a the preview available on TechNet.

    I'm on my phone right now so I will post link soon.

  • Hey.

    That looks really awesome.

    Ninite on stereoids? I will do some further testing. If we can update all Machine across from Windows XP to Windows 10 with that tool ... ouhhh ... that sounds ... *dreeeeeeaaaming*

  • From what I read the Windows 10 version OneGet doesn't allow you to update apps.  

    "Currently, there's no Update-Package, so there's no way to support upgrades.

    In fact, if you call Install-Package on a package you already have installed, and there's a new version, it just does an install as a new package (in Chocolatey, it ends up unpacked side-by-side in the lib folder) and worse, the package manager forgets that the old version exists -- thus, when you call uninstall-package, it doesn't clean up old versions, only the most recent."

    oneget.codeplex.com/.../16

  • Hello again.

    Justed played with Chocolatey! First test was to "update" installed Applications like "Adobe Reader". With ninite we can Update installed applications. It seems that with chocolatey we can only update packages that were installed with chocolatey, not such applications that supported, but not installed with chocolatey.

    Any ideas?