Showing results for 
Show  only  | Search instead for 
Did you mean: 
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 1 of 2

How to Deploy Agent/Smart Installer with MDM in macOS

A frequently asked question of Mac-using McAfee customers is how do I deploy a .sh script to Macs? MDMs generally can only only deploy .pkg or .dmg files to Mac. The answer is to use a packaging utility to wrap the .sh file inside a .pkg file. MDMs typically provide a packaging tool, or you can use of the many open-source packaging utilities.

McAfee has posted instructions on how to build a .pkg for use with Jamf Pro MDM – KB94262 – Deploying McAfee products with Jamf Pro software.

For others, the basic steps are:

1. Obtain the (contains or from your ePO admin.

2. Place the file where you want it installed – I recommend /tmp as the file will get cleaned up after a reboot.

3. Open your packaging tool and drag-n-drop the file into the tool window. This will place the file in the appropriate installed location.

4. Change the owner to root, group to wheel, and permissions to 755 (owner – all, group – read and execute, others – read and execute).

5. Add version number to package filename. In on-prem epo, version numbers are important, while in MVISION ePO, version numbers aren’t so important. You will be upgrading your agent package at some point and it helps to be able to tell the current version from the new version!

6. Build your package and upload to your MDM for distribution. We always recommend signing packages but doing so is outside the scope of this post.

The MDM will need to execute the script that the package wrote to disk. You can either do this by running the command in a policy from MDM or via a .pkg postinstall script. The postinstall script is outside the scope of this post, but Rich Trouton has an excellent post here that dives into the technical aspects of installer packages.

As for the run command method, the MDM will need to run:
• For /private/tmp/ -i
• For /private/tmp/

NOTE: There is currently a bug in the smart installer script – you must update the script in a text editor to get it to install. The workaround is available here and also in the above Jamf Pro link.

Was my reply helpful?

If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?
1 Reply
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 2 of 2

Re: How to Deploy Agent/Smart Installer with MDM in macOS

Thank you for the information, this would definitely helpful 🙂 

You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community