KACE 1000 Agent 5.5 for Mac silent installer
** This article is deprecated, read our updated article here**
Ever since we started tapping more into the “power” of KACE on our Mac’s it’s no secret I have had a lot of problems trying to get KACE to respond to OSX as easy as it responds to Windows OS deployments. One of the biggest issues I have discovered KACE has on Mac is that it takes a long time while it kicks its check-in to the KACE1000, you would think the client natively would do this after it finished installing but it doesn’t. We recently upgraded to 5.5.30275 and one of my first tasks was to roll out an updated KACE agent for Mac OS X.
Interestingly KACE’s only knowledge base article regarding the packaging for a silent install of their client is from 5.3. Calling KACE support for a more updated option was pretty useless as the three tech support agents I spoke to did not know how to package the app and add the check-in options I wanted to add. They admitted that they support modifications to the KACE Agent in Windows, but they do not support them on Mac.
There is not a lot of information on how to build a client with the specifications I wanted the client to have which were:
- To be able to install silently and have the kace 1000 server address injected into it.
- To check-in automatically at the end of it’s installation.
One source I found helpful was the article written by Rich Trouton in DerFlounder, about Building an automated KBox 1000 agent installer, that was very useful and was the kickstarter to my project. I also referenced the uninstaller portion of my script to another article he wrote for removing the KACE 1000 Agent.
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-55-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.
If you need help don’t hesitate to leave a comment below and don’t forget you can download this article in PDF from the link below!