This post is going to be the sixth post I’ve written around JumpCloud Commands. This post is going to show you how to Install Windows Applications via JumpCloud Commands without UAC control getting in the way from the JumpCloud Command Menu.
Stage 1 – Setup and Prerequisites.
This stage installs Chocolatey (A package manager for Windows Software). This needs to only be done once per machine. You can read more about the PowerShell installation here. I strongly recommend that you inspect the install.ps1 script that this PowerShell command calls before running it.
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Stage 2 – Selecting your applications to install.
The easiest way I found was to browse the Chocolatey repo. At the time of writing, there are 7455 packages ready to install with a simple command. Once I have selected the software I want to roll out I collect the scripts (They look like “choco install adobereader”) into a text file for all the applications that I want to install. Once I have everything I need then I start formatting the script.
Stage 3 – Setting up and running the script to Install Windows Applications via JumpCloud Commands.
Although the choco command is meant to work, when it’s run by JumpCloud command Powershell it just doesn’t work. However, with a bit of tweaking, you can get it to work. These tweaks basically involve pointing the command at the actual choco.exe rather than using the short command. So my script looks like the below. The /Y tells Choco to install the Application without prompting.
C:\ProgramData\chocolatey\choco.exe install vlc /Y; C:\ProgramData\chocolatey\choco.exe install adobereader /Y; C:\ProgramData\chocolatey\choco.exe install googlechrome /Y; C:\ProgramData\chocolatey\choco.exe install firefox /Y; C:\ProgramData\chocolatey\choco.exe install skype /Y; C:\ProgramData\chocolatey\choco.exe install 7zip /Y; C:\ProgramData\chocolatey\choco.exe install microsoft-teams.install /Y;
Stage 4 – Wait
That’s it, you now just need to wait for the applications to install, some of them do take a bit of time and others have not shown up until you reboot the machine. I have tested this as a standalone administrator account, a JumpCloud administrator and a normal JumpCloud user and it works fine.
As always if there are any other commands, you would like me to write, and test don’t hesitate to leave a comment or find me on twitter.com
Hello, am I limited to the apps that are on the chocolatey site? Can I create my own link to an exe. that I would like to run and use the same method for installing it?
Essentially, how can I add a list of software that we always install on our customer laptops?
Hi Sebastian,
Ive just found this page https://chocolatey.org/docs/create-packages which allows you to publish your own packages.
ONce you have installed chocolatey you can setup your application install script like:
C:\ProgramData\chocolatey\choco.exe install vlc /Y;
C:\ProgramData\chocolatey\choco.exe install adobereader /Y;
C:\ProgramData\chocolatey\choco.exe install googlechrome /Y;
C:\ProgramData\chocolatey\choco.exe install firefox /Y;
C:\ProgramData\chocolatey\choco.exe install skype /Y;
C:\ProgramData\chocolatey\choco.exe install 7zip /Y;
C:\ProgramData\chocolatey\choco.exe install microsoft-teams.install /Y;
Hope that helps.
R
@Richard Can you use Choco to deploy your own installers besides that list of “pre-baked” apps? I think that’s what @Sebastian was trying to ask.
Hi Bob, I think you can if you sign up for the pro version of Choco. Ive just come across https://winstall.app/ as well which I will be looking in to.