Skip to content

Instantly share code, notes, and snippets.

@timsutton
Created July 12, 2016 17:17
Show Gist options
  • Save timsutton/212bfed9da2056a070a12ac27febeb71 to your computer and use it in GitHub Desktop.
Save timsutton/212bfed9da2056a070a12ac27febeb71 to your computer and use it in GitHub Desktop.
Simple script to automate the Adobe Acrobat Customization Wizard steps
#!/bin/sh
#
# Very quick and dirty script to make an unserialized, customized
# Acrobat Pro DC installer via the customization wizard, but
# in an automated fashion.
# This does the equivalent of the following in the wizard:
# - Accept EULA
# - Disable PDF Rendering in browsers
# - Enable Feature Lockdown (supplies a plist that disables the updater
# for 10/11/2015/DC)
# - No serial is provided, assuming this pkg may only ever use a named
# license.
#
# Instructions:
# Download the Acrobat DC from here:
# https://helpx.adobe.com/acrobat/kb/acrobat-dc-downloads.html
# and double-click the DMG to mount it.
#
# Download the Acrobat Customization Wizard DC from here:
# http://www.adobe.com/support/downloads/detail.jsp?ftpID=5893
# and double-click to mount it.
#
# Run this script and wait. It will output a pkg file in the cwd
# with the build date from the ESD appended.
#
# Note that to import this into Munki, an installs array should
# still be carefully crafted, a proper minimum_os_version set, etc.
ESD_ROOT="/Volumes/Acrobat DC"
VERSION=$(cat "${ESD_ROOT}/Acrobat DC/CD_Info.txt" | awk '/Build/ {print $4}')
output_pkg="$(pwd)/AcrobatProDC-${VERSION}.pkg"
# Guess what? This prov file has to be named exactly this, since Acrobat
# 12 == 15 == 2015
prov_file=$(mktemp /tmp/Acro12000prov.xml)
cat > "${prov_file}" << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EULA_ACCEPT</key>
<string>YES</string>
</dict>
</plist>
EOF
feature_lockdown_file=$(mktemp /tmp/acrobat_cust_featureXXXX)
cat > "${feature_lockdown_file}" << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DC</key>
<dict>
<key>FeatureLockdown</key>
<dict>
<key>bUpdater</key>
<false/>
</dict>
</dict>
<key>2015</key>
<dict>
<key>FeatureLockdown</key>
<dict>
<key>bUpdater</key>
<false/>
</dict>
</dict>
<key>11</key>
<dict>
<key>FeatureLockdown</key>
<dict>
<key>bUpdater</key>
<false/>
</dict>
</dict>
<key>10</key>
<dict>
<key>FeatureLockdown</key>
<dict>
<key>bUpdater</key>
<false/>
</dict>
</dict>
</dict>
</plist>
EOF
# build it
"/Volumes/Adobe Customization Wizard/Acrobat Customization Wizard DC.app/Contents/Resources/pdptool.sh" \
--input "${ESD_ROOT}/Acrobat DC/Acrobat DC Installer.pkg" \
--output "${output_pkg}" \
--prov "${prov_file}" \
--disablebrowser \
--featurelockdown "${feature_lockdown_file}"
# clean up
rm "${prov_file}" "${feature_lockdown_file}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment