The packaging engine from Ivanti DSM is unique. However, packaging software applications takes a lot of time. Not only the initial packaging and testing can take a few hours, but also the maintenance and updating of the packages to a new revision is always associated with work - after all, you don't want to roll out outdated packages, right? In this article I would like to describe how to use packages with Ivanti DSM Chocolatey and thus save time.
Chocolatey is a command line tool for the automated downloading and installation of software. Chocolatey provides a powershell command with which almost every application can be installed via powershell. Linux users have known this for a long time. You write a script that installs all the necessary programs. This is also possible with Chocolatey. Wouldn't it be great if you could get elevated rights through DSM and the software comes from Chocolatey? This saves the complete packaging and would always have the latest installation in a timely manner. In this article I describe how you use Ivanti DSM Chocolatey packages.
Chocolatey is easily installed via the Powershell:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Since the DSM takes care of the elevated rights, we no longer need to worry about the execution policy. We create a simple eScript and use the CallScript command to call up a powershell file.
In this powershell file we write the Chocolatey installation command WITHOUT ExecutionPolicy. The ChocoInstall.ps1 file looks like this:
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
The Chocolatey Runtime can now be installed on all computers.
On every computer that has installed the Chocolatey package, I can now install any application with a "choco install" command without even having to call up a setup. Just like with the Chocolatey installation, you simply create a script and trigger a powershell file with CallScript.
Here is an example with WinRar:
CallScript('.\Extern$\install.ps1','')/TS ! : $BeginUninstallScript CallScript('.\Extern$\uninstall.ps1','')/TS
choco install winrar -y
choco uninstall winrar -y
Problems can arise when upgrading Chocolatey packages from the Community Repository. Most of the time, the problem is due to a web proxy that blocks the download. Most chocolatey packages are downloaded from the manufacturer's website, so the URL is often different and may need to be whitelisted on the proxy.
With Chocolatey and DSM it is extremely easy to roll out software quickly. The official Chocolatey Repository is well maintained and checked for malware. If you have any doubts, you can install your own Chocolatey Repository (Enterprise Version). There are only a few third-party applications that are not available in the Chocolatey Repository. Applications requiring a license are rarely included.
Of course, everyone has to decide for themselves whether the use of Chocolatey makes sense. For smaller companies with few employees who can package, this is probably the most efficient solution.