Skip to the road
Adminpatchlog

Windows & PowerShell

Deploying Mac Apps from PKG and DMG Files: Checks for Windows Admins

Richard Martinez 586 travellers

PKG files install through macOS Installer; DMGs must be mounted first. Inspect signatures, test prompts and verify app versions before rollout.

Deploying Mac Apps from PKG and DMG Files: Checks for Windows Admins

Mac app deployment starts with identifying what the download actually contains. A PKG is an installer package that macOS Installer can process. A DMG is a mounted disk image: it may contain an app to copy, a PKG to install, or another installer with its own workflow. That difference affects deployment steps, installation records and what administrators need to check before a wider rollout.

For teams managing Windows and macOS from the same environment, the familiar file extension doesn’t tell the whole story. A PKG can often be installed silently from the command line. A DMG adds a mounting step, and its contents determine what happens next. Read the vendor’s deployment instructions and inspect the files before building a deployment around either format.

Identify the payload before installing

A PKG can bundle application files, instructions for where to place them, and scripts that run before or after installation. macOS Installer processes those contents and usually creates an installation receipt, giving administrators a record they can check later.

A DMG is a container, more like an ISO image than an installer package. After mounting it, you might find an app bundle intended for /Applications, a PKG that should be passed to Installer, or a separate installer app. Don’t assume every DMG uses the same procedure.

You can inspect these files without launching the installer. Attach a DMG in read-only mode, then list its mounted contents. For PKG files, pkgutil can list payload paths or expand the package into a folder for inspection. Replace the example names and paths with the actual file locations; use the mount path returned by hdiutil attach.

hdiutil attach Vendor.dmg -nobrowse -readonly
ls /Volumes/Vendor
pkgutil --payload-files Vendor.pkg
pkgutil --expand Vendor.pkg ~/Desktop/vendor-expanded

The -nobrowse option keeps the mounted volume out of Finder. Listing payload files shows what a package would install, while expanding it lets you examine its contents, including any scripts. These checks help reveal what a deployment step will put on the Mac before it runs.

Check signatures and vendor requirements

Start with the package signature. Run pkgutil --check-signature Vendor.pkg to see whether the PKG is signed and identify its signer. For an app bundle inside a DMG, spctl -a -v Vendor.app asks Gatekeeper to assess it. Apple’s documentation describes a notarized app result that includes source=Notarized Developer ID.

A signature check is one part of the review. The vendor’s deployment notes may specify a configuration file, license key, install order or other prerequisites. That guidance can also explain what prompts to expect and whether an app has separate builds for different Mac processors.

For a PKG, a typical command line installation is short:

sudo installer -pkg /path/to/Vendor.pkg -target /

DMG deployment depends on what’s inside. The following example mounts an image, copies an app bundle to /Applications, then detaches the image. If the DMG contains a PKG, install that package instead of copying the app.

hdiutil attach Vendor.dmg -nobrowse -readonly -mountpoint /tmp/vendor
ditto /tmp/vendor/Vendor.app /Applications/Vendor.app
hdiutil detach /tmp/vendor

Deployment can also be blocked by user-facing prompts. An app that’s open during an update may prevent the update from completing. Some privacy permissions, including Full Disk Access, can be preapproved through an MDM privacy profile. A deployment script can’t approve a prompt on the user’s behalf.

Pilot the package across your Mac fleet

Test each app before broad deployment, following the same endpoint management practices you use for other software. Include an older macOS release if one is part of your environment. Test on an Intel Mac as well if you still manage one: some vendors provide different builds for different chip types.

PDQ can deploy PKG and DMG files to Macs from the console used to manage Windows devices. A custom package can include an installation step for either format and Bash or Zsh steps for vendor-specific requirements. For common applications, PDQ’s Package Library offers prebuilt macOS packages and patching automation. Each app still needs its own pilot because its installer, prompts and update behavior can differ.

Confirm the app works and plan its lifecycle

A successful deployment status only confirms that the deployment reported success. On a pilot Mac, check the installed app’s signing details and version:

codesign -dv /Applications/Vendor.app
defaults read /Applications/Vendor.app/Contents/Info.plist CFBundleShortVersionString

The first command displays the app’s bundle identifier and signing information. Compare those details with the expected app and vendor; displaying them doesn’t itself verify the signature. The second command returns the app version. For PKG installs, pkgutil --pkgs lists installed package receipts. An app copied from a DMG doesn’t create a receipt simply because it was copied.

Launch the app as a standard user during the pilot to catch first-run prompts or dialogs that an installation status won’t reveal. Also decide how updates and removal will work before deploying broadly. Some apps update themselves; others require administrators to deploy each version, making third-party patch management relevant to the rollout plan.

Removing an app copied from a DMG usually means deleting its app bundle. A PKG may also install helper tools or background services, so check for a vendor uninstaller before planning removal. Keep macOS updates and upgrades on a separate management track: those use Apple’s software update process and the MDM workflow for managed Macs. A tested install, verification and removal plan gives administrators a clearer basis for expanding a Mac app deployment.

Source: Richard Martinez · www.pdq.com

On the same route