Building a Mac OS-X Package to Install the ZENworks 11.2 Adaptive Agent

Building a Mac OS-X Package to Install the ZENworks 11.2 Adaptive Agent

ZENworks 11SP2 now includes support for managing Macintosh OS-X devices via ZENworks! This article describes how to wrap the installation files for the ZENworks 11SP2 adaptive agent in a Macintosh OS-X package file. To do this you'll need a copy of ZENworks 11SP2, a Mac OS-X device and the latest version of the Apple XCode tools. Once you complete this solution you will have a .pkg file that can be sent to your users and installed on their devices.

Building a Mac package to deploy the Macintosh OS-X Agent

Because ZENworks uses a Linux or Windows server to build the adaptive agent packages after an install or system update, it is not possible today to have a Mac OS-X package (.pkg) built automatically. The default is to build a self-extracting and installing .bin file that can then be used by running standard shell commands. However, many Macintosh end-users are uncomfortable or unfamiliar with this process. As such they may be resistant to install the agent unless it is packaged in a familiar format. This document describes how to use the Apple Package Maker utility to create a Macintosh Package File (.pkg) that can be sent to users and used to install the ZENworks Adaptive Agent.

  1. First you need to make sure that you have the latest version of Xcode installed so that the Package Maker application is available. To do this follow the instructions described here:

  2. On the Macintosh devices where you installed Xcode, create a directory in your home directory called ZenAgent. For instance if you are logged in as jblackett the path to this directory would be /Users/jblackett/ZenAgent.

  3. Copy the Mac installer package from your Primary Server to the ZenAgent directory on the device you installed the Xcode tools on. The agent is located on the Primary Server in the following directory:%ZENWORKS_HOME%\install\downloads\setup\_all\PreAgentPkg_AgentMacComplete.bin

  4. Create a script file using vi with the following content. This will be used to launch the installer and log the output to the zenagentinstall.log file.
    /tmp/PreAgentPkg_AgentMacComplete.bin > /tmp/zenagentinstall.log

  5. Save the file as in the ZenAgent folder you created in step 2.

  6. At a terminal prompt enter the following commands to set ownership and make the files executable:
    chmod -R +rx /Users/<username>/ZenAgent
    chown -R root:admin /Users/<username>/ZenAgent

  7. Launch Package Maker by running the command
    open -a /Developer/Applications/Utilities/

  8. At the Install Properties, in the Organization field enter com.novell

  9. In the Minimum Target, select Mac OS X v 10.5 Leopard

  10. Click OK.

  11. Configure the package properties:

    1. Select the Configuration tab of the Untitled (Package) pane.

    2. In the Title field enter ZENworks Adaptive Agent for Mac OS-X

    3. For the Install Destination, uncheck Volume selected by user and then check System volume.

    4. Select the Requirement tab.

    5. Click the +

    6. In the ‘is’ dropdown select >=

    7. In the textbox enter 200

    8. In the Message box, enter Insufficient disk space, please make sure you have at least 200 MB available.

    9. Click OK.

  12. Add the files required for installing the agent to your package:

    1. In Finder, locate your ZenAgent folder.

    2. Drag the ZenAgent folder to the Drop contents here pane in Package Maker

    3. In the Destination textbox, enter /tmp

    4. Select the Scripts tab.

    5. Click the gear icon next to the Postinstall textbox, and select Choose.

    6. Browse to your script; then click Choose.

  13. Save the package definition.

  14. Click Build.

  15. In the Save As field enter ZENAgent; then click Save.

  16. Now transfer to ZENAgent.pkg file to a test Macintosh device where you want to install the ZENworks agent.

  17. Run the package and follow the prompts. You should be required to enter administrative credentials.

  18. When complete the agent will automatically register the device with ZENworks. If you want the z-icon to appear you can logout and then log back in.

Labels (1)
Tags (2)


Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Here is the super short 4 step version to this process...

1 - Download the .bin file from your server %ZENWORKS_HOME%\install\downloads\setup\_all\PreAgentPkg_AgentMacComplete.bin

2 - Download and install 7-zip from the internet

3 - Right-click on the bin file and select 7-zip \ Extract here

And there is your .pkg file ready for you to install... OK, so maybe it's a 3 step process 🙂
Is there a way to add a registration key to the install script?
I'm hearing Jeff Goldblum, "...ha, there is no step 4".

Very cool solution professor_billings ;^)
So, I'm wondering about the ZENworks 2017 Agent for Mac... this method doesn't appear to work.

Any thoughts about a simple method for the current version?
Top Contributors
Version history
Revision #:
4 of 4
Last update:
‎2020-02-18 22:26
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.