KACE 1000 Agent 6.2.1025 Silent Installer for Mac
Update: A newer article on deploying KACE 1000 Agent 6.4 has been published. Go check it out!
This guide will show you how to create a modified KACE 1000 Agent 6.2.1025 Silent Installer for Mac. Please change any references to the KACE 5.5 Agent to reflect your new 6.2.1025 Agent. If you still needed to check out the previous article with the KACE 1000 5.5 Agent you can do so from here.
At the mothership we finally upgraded our K1000 and K2000 systems to the prettier 6.x platform. This is an updated guide of our KACE 1000 5.5 Silent Installer for Mac, written last year.
The main reason I wanted to build this client install was that I wanted to be able to:
- Install silently and have the kace 1000 server address injected into it.
- Check-in automatically at the end of the client’s installation.
Originally Rich Trouton from DerFlounder, wrote a script about Building an automated KBox 1000 agent installer, and he wrote another script for removing the KACE 1000 Agent. The scripts I used are cleaned up versions of Rich’s scripts modeled after our deployment at the Mothership.
For this project I will be using Stephan Sudre’s Integrated Packaging Environment, Packages, which is free.
To begin with, let’s setup a new Packages Project. Choose Raw Package, to go to the New Project window,
and then choose the name and location of your project for this example I will name my project kace-62-agent-mac, then click on the Finish button.
This will take you to your project window, which has several tabs: Project, Settings, Payload, Scripts and Comments. In the first tab, Project, set the Name and path as well as any exclusions as seen below, for this example just use the options below.
On the next tab, Settings, set your Identifier, Post-installation Behavior and Options. For your identifier do something like com.yourcompany.pkg.kace, for Post Installation Behavior Do Nothing and for Options, make sure that Require admin password for installation is check marked.
For this project, we are going to skip the Payload tab and go into the Scripts. In this section you will add your post-flight script in the Post-Installation section, by copying and pasting the script below using a text editor (I like to recommend CodeRunner or Text Wrangler for scripting, because TextEdit likes to insert weird characters on .txt files) then click on Set, to choose the file to add it to the package.
The script is super easy. the first part is an uninstaller that will remove KBox Agent 5.1 and 5.3. The next part of the script basically echos the name of your kbox 1000 server into amp.conf and with some Applescript we tell Terminal to execute runkbot, this way at the end of the installer the client has pinged the Kace 1000 server. I have posted the code on EnterpriseOSX GitHub repo as well. At this point simply click on Set under postflight and choose the script you just made.
In Additional Resources, add the ampagent.pkg file.
On the last tab, is the Comments. This section is optional but as a good habit, I like to leave constructive comments in case a colleague needs to build a package or I come at a later date to update.
As a last step, you can go to File > Save and then go to Build (Command-B) to build your package and deploy manually or with ARD.