Deploying Photo Mechanic with Munki

Earlier this year Camera Bits consolidated the different Photo Mechanic (PM) versions into a single “All-in-One” download.

The cataloging feature of Photo Mechanic Plus is now simply activated (or not) by the license used to activate the application. (This is exactly how Microsoft handles Office for Mac.)

There are now subscriptions as well as perpetual licenses available which all use the same download.

Thankfully the ability to programmatically activate and deactivate is still there so only a few changes are needed in our Munki scripts.

Read on for the required changes…

What follows is an update to my previous posts without all the background details:

To automate the activation and deactivation we use a postinstall_script and a preuninstall_script in the Munki PkgInfo file for Photo Mechanic.


The postinstall_script will get executed after PM is installed by Munki. This script queries the activation status and then applies the registration if needed. Edit the script to substitute your company’s registration information.

if "/Applications/Photo" checkLocalActivationValid PM; then
	echo "Photo Mechanic is already activated, no action needed."
	echo "Photo Mechanic is not activated, activating online."
	"/Applications/Photo" activateOnline PM XXXXXXXXXXXXXXXX


The preuninstall_script will get executed by Munki before PM is uninstalled. This script deactivates the computer before the application is removed from disk and can be used as-is.

if "/Applications/Photo" deactivateOnline PM; then
	echo "Photo Mechanic has been deactivated."
	echo "There was a problem deactivating Photo Mechanic."


I have updated my AutoPkg recipes for the new release of Photo Mechanic and the changed scripts:

Leave a Reply

Your email address will not be published. Required fields are marked *