Modify a QuickAdd Package to run a preinstall script

arekdreyer
Contributor

Once upon a time, someone needed to unenroll from one MDM instance and enroll in their new Jamf Pro instance. They modified their QuickAdd package to include a preinstall script to unenroll from the old MDM instance.

Here's how to use Composer to add a preinstall script to your QuickAdd package. I worked with @HCSTech for this post.

  1. Use Recon to create a QuickAdd Package for your Jamf Pro (it doesn't matter if you sign it or not).

  2. Open Composer.

  3. If you see the window titled "Choose a method to create your package," click Cancel.

  4. In Finder, drag the QuickAdd package to the sidebar of Composer. 0a86b8433f3145b88faab48033e7ceb4

  5. In Composer, click Convert to Source. 05bdca2f1e8145e494d8520a2df1c1ec

  6. In the Sources section, select the QuickAdd package that was just created.

  7. Click the disclosure triangle for the new package.

  8. Right-click Scripts, choose Add Shell Script, then choose preinstall. 5da63de9b8b04648b7df10c19fa749c0

  9. Select the preinstall script.

  10. Edit the preinstall script. See this article for a sample preinstall script that unenrolls the Mac from a previous MDM instance. 878677b84f34448881fcf1dff6cb606c

  11. Select your package in the Sources section of the Composer sidebar.

  12. At the "Do you want to save changes" dialog, click Save.

  13. Click Build as Package in the toolbar.

  14. Specify the destination to save the package, then click Save.
    Note that if you save your new QuickAdd.pkg in the same location as your original QuickAdd.pkg, your old QuickAdd.pkg is renamed to "QuickAdd old.pkg ".

Test.

  1. Copy the QuickAdd package to a test Mac that's enrolled in a different MDM instance.

  2. Open the package and complete the installation.

  3. Open the Profiles preferences and confirm that the Mac is enrolled in your desired Jamf Pro.

0 REPLIES 0