Newbie here, where do I find the actual Adobe Reader 11.0..09 update? When I try to download it on my test machine, it just automatically installs through Safari. I need to download so I can put it into Casper Admin. Thanks.
Check out autopkg - great tool for getting updates. You can automate it or get them downloaded on demand (one or several updates from various vendors)
https://github.com/autopkg/autopkg/wiki/Getting-Started
Sounds cool. What will this do for me? I think I've heard of autopkg, but don't know what it is.
you can get the traditional package at http://get.adobe.com/reader/ There's a link for Are You an IT Manager for OEM? to register.
@Yalem - check the link for more info.
http://get.adobe.com/reader/enterprise/
Google 'adobe reader offline installer'.
Hi all,
Here is an Adobe Reader updater/installer script. No need to package anything! Find it here.
Enjoy ;)
joe
@joe.farage, I was just getting to implementing your beautiful script but alas, Adobe has killed Reader and replaced it with Acrobat Reader DC. I tried repairing the script myself, but Adobe has changed the versioning scheme to match the other CC products. I would love to hear your thoughts.
Hi @dferrara ! HI all !
I've updated the script to work with the new Adobe Acrobat Reader DC. Please you can test it and come back if you have problems.
Kind regards,
joe
#!/bin/sh
#####################################################################################################
#
# ABOUT THIS PROGRAM
#
# NAME
# AdobeReaderUpdate.sh -- Installs or updates Adobe Acrobat Reader DC
#
# SYNOPSIS
# sudo AdobeReaderUpdate.sh
#
####################################################################################################
#
# HISTORY
#
# Version: 1.1
#
# - v.1.0 Joe Farage, 23.01.2015
# - v.1.1 Joe Farage, 08.04.2015 : support for new Adobe Acrobat Reader DC
#
####################################################################################################
# Script to download and install Adobe Reader.
# Only works on Intel systems.
dmgfile="reader.dmg"
logfile="/Library/Logs/AdobeReaderDCUpdateScript.log"
# Are we running on Intel?
if [ '`/usr/bin/uname -p`'="i386" -o '`/usr/bin/uname -p`'="x86_64" ]; then
## Get OS version and adjust for use with the URL string
OSvers_URL=$( sw_vers -productVersion | sed 's/[.]/_/g' )
## Set the User Agent string for use with curl
userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X ${OSvers_URL}) AppleWebKit/535.6.2 (KHTML, like Gecko) Version/5.2 Safari/535.6.2"
# Get the latest version of Reader available from Adobe's About Reader page.
latestver=``
while [ -z "$latestver" ]
do
latestver=`/usr/bin/curl -s -L -A "$userAgent" https://get.adobe.com/reader/ | grep "<strong>Version" | /usr/bin/sed -e 's/<[^>][^>]*>//g' | /usr/bin/awk '{print $2}'`
done
echo "Latest Version is: $latestver"
latestvernorm=`echo ${latestver} | sed -e 's/20//'`
# Get the version number of the currently-installed Adobe Reader, if any.
if [ -e "/Applications/Adobe Acrobat Reader DC.app" ]; then
currentinstalledver=`/usr/bin/defaults read /Applications/Adobe Acrobat Reader DC.app/Contents/Info CFBundleShortVersionString`
echo "Current installed version is: $currentinstalledver"
if [ ${latestvernorm} = ${currentinstalledver} ]; then
echo "Adobe Reader DC is current. Exiting"
exit 0
fi
else
currentinstalledver="none"
echo "Adobe Reader DC is not installed"
fi
ARCurrVersNormalized=$( echo $latestver | sed -e 's/[.]//g' -e 's/20//' )
echo "ARCurrVersNormalized: $ARCurrVersNormalized"
url=""
url1="http://ardownload.adobe.com/pub/adobe/reader/mac/AcrobatDC/${ARCurrVersNormalized}/AcroRdrDC_${ARCurrVersNormalized}_MUI.dmg"
url2=""
#Build URL
url=`echo "${url1}${url2}"`
echo "Latest version of the URL is: $url"
# Compare the two versions, if they are different or Adobe Reader is not present then download and install the new version.
if [ "${currentinstalledver}" != "${latestvernorm}" ]; then
/bin/echo "`date`: Current Reader DC version: ${currentinstalledver}" >> ${logfile}
/bin/echo "`date`: Available Reader DC version: ${latestver} => ${latestvernorm}" >> ${logfile}
/bin/echo "`date`: Downloading newer version." >> ${logfile}
/usr/bin/curl -s -o /tmp/reader.dmg ${url}
/bin/echo "`date`: Mounting installer disk image." >> ${logfile}
/usr/bin/hdiutil attach /tmp/reader.dmg -nobrowse -quiet
/bin/echo "`date`: Installing..." >> ${logfile}
/usr/sbin/installer -pkg /Volumes/AcroRdrDC_${ARCurrVersNormalized}_MUI/AcroRdrDC_${ARCurrVersNormalized}_MUI.pkg -target / > /dev/null
/bin/sleep 10
/bin/echo "`date`: Unmounting installer disk image." >> ${logfile}
/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep Adobe Acrobat Reader DC Installer | awk '{print $1}') -quiet
/bin/sleep 10
/bin/echo "`date`: Deleting disk image." >> ${logfile}
/bin/rm /tmp/${dmgfile}
#double check to see if the new version got updated
newlyinstalledver=`/usr/bin/defaults read /Applications/Adobe Acrobat Reader DC.app/Contents/Info CFBundleShortVersionString`
if [ "${latestvernorm}" = "${newlyinstalledver}" ]; then
/bin/echo "`date`: SUCCESS: Adobe Reader has been updated to version ${newlyinstalledver}" >> ${logfile}
# /Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType hud -title "Adobe Reader Updated" -description "Adobe Reader has been updated." &
else
/bin/echo "`date`: ERROR: Adobe Reader update unsuccessful, version remains at ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
exit 1
fi
# If Adobe Reader is up to date already, just log it and exit.
else
/bin/echo "`date`: Adobe Reader is already up to date, running ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi
else
/bin/echo "`date`: ERROR: This script is for Intel Macs only." >> ${logfile}
fi
exit 0
@joe.farage Thanks Joe! I'll try it out!
can this be modified to look for an existing A. Reader and remove it by chance? Just so it doesn't confuse the users or does it overnight the old A.Reader (non-DC versions I mean)?
any updates on how this is working for people?
@jwojda The whole Acrobat Reader thing is still messing me up -- who in their right mind thought that was a good name for this -- the script itself is awesome and I'm using it in our Yosemite image. I thought if people need the old Reader, they can get it from Self Service.
Yeah, Adobe Acrobat Reader DC is just a gem of a name isn't it? :) Just rolls off the tongue.
Anyway, Reader DC installs a new application, because, well, its a new application. So it won't overwrite the older Reader. You can have both installed at the same time, though I can't imagine any reason to do that. One of them is enough.
If you really want to have it remove the older application, that's certainly doable.
Thanks for sharing your scripts @joe.farage
Hi all,
I ran the DC version, and it seemed to block/lock while the install was happening. I'd get the latest URL echo, but then output in terminal would stop. I let it sit for a couple minutes, and then did a control+c. I ran it again, and it detected that it was installed! Just FYI.
Also, I'd recommend an option for this script to both remove the non-DC version, plus set/override the default system extension handler to use the DC version when a user tried to open a PDF.
Something like
rm -rf /applications/Adobe Reader.app
defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType = "com.adobe.pdf"; LSHandlerRoleAll = "com.adobe.reader";}'
The default handler update not be needed, because the DC version uses the same identifier as the non-DC version, not sure if deleting an app will revert this to the Preview app or not.
@joe.farage I've been using your script for some time and I just wanted to say its awesome! Recently however, I have seen some oddities...reference link from Adobe maybe changed? What do you think ...
Submitting log to https://jss.teslamotors.com:8443/
Executing Policy Adobe Acrobat Reader DC...
Running script Application_AdobeDC-UpdateReader...
Script exit code: 1
Script result: Latest Version is: 2015.009.20069
Current installed version is: 15.009.20077
ARCurrVersNormalized: 1500920069
Latest version of the URL is: http://ardownload.adobe.com/pub/adobe/reader/mac/AcrobatDC/1500920069/AcroRdrDC_1500920069_MUI.dmg
The user is actually running a newer version that the script is returning... As you can see above, the client is v2015.009.20077 and the newest version is v2015.009.20069
@ryan.s I also saw the same thing last week. I made a couple small tweaks to use with my EA:
# Script to download and install Adobe Reader.
# Only works on Intel systems.
dmgfile="AcroRdrDC_${ARCurrVersNormalized}_MUI.dmg"
logfile="/Library/Logs/AdobeReaderDCUpdateScript.log"
# Are we running on Intel?
if [ '`/usr/bin/uname -p`'="i386" -o '`/usr/bin/uname -p`'="x86_64" ]; then
## Get OS version and adjust for use with the URL string
OSvers_URL=$( sw_vers -productVersion | sed 's/[.]/_/g' )
## Set the User Agent string for use with curl
userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X ${OSvers_URL}) AppleWebKit/535.6.2 (KHTML, like Gecko) Version/5.2 Safari/535.6.2"
# Get the latest version of Reader available from Adobe's About Reader page.
latestver=``
while [ -z "$latestver" ]
do
latestver=`/usr/bin/curl -s -L -A "$userAgent" https://get.adobe.com/reader/ | grep "<strong>Version" | /usr/bin/sed -e 's/<[^>][^>]*>//g' | /usr/bin/awk '{print $2}' | cut -c 3-14`
done
echo "Latest Version is: $latestver"
latestvernorm=`echo ${latestver}`
# Get the version number of the currently-installed Adobe Reader, if any.
if [ -e "/Applications/Adobe Acrobat Reader DC.app" ]; then
currentinstalledver=`/usr/bin/defaults read /Applications/Adobe Acrobat Reader DC.app/Contents/Info CFBundleShortVersionString`
echo "Current installed version is: $currentinstalledver"
if [ ${latestvernorm} = ${currentinstalledver} ]; then
echo "Adobe Reader DC is current. Exiting"
exit 0
fi
else
currentinstalledver="none"
echo "Adobe Reader DC is not installed"
fi
ARCurrVersNormalized=$( echo $latestver | sed -e 's/[.]//g' )
echo "ARCurrVersNormalized: $ARCurrVersNormalized"
url1="http://ardownload.adobe.com/pub/adobe/reader/mac/AcrobatDC/${ARCurrVersNormalized}/AcroRdrDC_${ARCurrVersNormalized}_MUI.dmg"
url2=""
#Build URL
url=`echo "${url1}${url2}"`
echo "Latest version of the URL is: $url"
# Compare the two versions, if they are different or Adobe Reader is not present then download and install the new version.
if [ "${currentinstalledver}" != "${latestvernorm}" ]; then
/bin/echo "`date`: Current Reader DC version: ${currentinstalledver}" >> ${logfile}
/bin/echo "`date`: Available Reader DC version: ${latestver} => ${latestvernorm}" >> ${logfile}
/bin/echo "`date`: Downloading newer version." >> ${logfile}
/usr/bin/curl -s -o /tmp/${dmgfile} ${url}
/bin/echo "`date`: Mounting installer disk image." >> ${logfile}
/usr/bin/hdiutil attach /tmp/${dmgfile} -nobrowse -quiet
/bin/echo "`date`: Installing..." >> ${logfile}
/usr/sbin/installer -pkg /Volumes/AcroRdrDC_${ARCurrVersNormalized}_MUI/AcroRdrDC_${ARCurrVersNormalized}_MUI.pkg -target / > /dev/null
/bin/sleep 10
/bin/echo "`date`: Unmounting installer disk image." >> ${logfile}
#/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep Adobe Acrobat Reader DC Installer | awk '{print $1}') -quiet
/sbin/umount "/Volumes/AcroRdrDC_${ARCurrVersNormalized}_MUI"
/bin/sleep 10
/bin/echo "`date`: Deleting disk image." >> ${logfile}
/bin/rm /tmp/${dmgfile}
#double check to see if the new version got updated
newlyinstalledver=`/usr/bin/defaults read /Applications/Adobe Acrobat Reader DC.app/Contents/Info CFBundleShortVersionString`
if [ "${latestvernorm}" = "${newlyinstalledver}" ]; then
/bin/echo "`date`: SUCCESS: Adobe Reader has been updated to version ${newlyinstalledver}" >> ${logfile}
# /Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType hud -title "Adobe Reader Updated" -description "Adobe Reader has been updated." &
else
/bin/echo "`date`: ERROR: Adobe Reader update unsuccessful, version remains at ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
exit 1
fi
# If Adobe Reader is up to date already, just log it and exit.
else
/bin/echo "`date`: Adobe Reader is already up to date, running ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi
else
/bin/echo "`date`: ERROR: This script is for Intel Macs only." >> ${logfile}
fi
exit 0
I must be dense... what were the changes made @millersc?
Sorry about that. I haven't had the chance to contribute yet to the original creator.
Changes to:
line 40: latestver - added a 'cut' to the end
line 44: removed 'sed' command
line 59: remove the second 'sed' command
line 63: removed (seems to work fine without it as line 66 is the same)
line 83: commented out, added additional line for 'umount' command (found it worked better)
These changes with EA looking at: defaults read "/Applications/Adobe Acrobat Reader DC.app/Contents/Info.plist" CFBundleVersion
Result in one of the following:
Script result: Latest Version is: 15.009.20069
Current installed version is: 15.009.20069
Adobe Reader DC is current. Exiting
or
Script result: Latest Version is: 15.009.20069
Adobe Reader DC is not installed
ARCurrVersNormalized: 1500920069
Latest version of the URL is: http://ardownload.adobe.com/pub/adobe/reader/mac/AcrobatDC/1500920069/AcroRdrDC_1500920069_MUI.dmg
I wish there was a like button... thanks @millersc that has done the trick!
Hi @ryan.s @millersc !!
thanks for the changes but for me it will not work if I have v.15.009.20077 installed.
there is something strange at adobe with versions. 15.009.20077 is older than 15.009.20069!!
That is strange @joe.farage . I'm not sure there is any work around for Adobe screw ups. I can only assume they released '77 and then pulled it for some reason. Is your whole fleet running '77?
Always happy to contribute!
Just want to chime in to say I have seen the same issue with one of my own scripts that updates ReaderDC. The current version posted from Adobe seems to be .20069, but I have .20077 installed on my Mac. I'm pretty sure Adobe's built in update system prompted me to install .20077, so I don't know what's going on with that.
This is unfortunately, one of the main issues I've run into with the scripts I have that auto pull down updated applications. If the vendor is lazy/stupid/incompetent, and messes up the latest version info being posted, or it doesn't match what actually gets pulled down, these kinds of scripts just break. We're at the mercy of the developers to spend 2 minutes to update a site that they just don't seem to have the time to do. Incredibly annoying.
I suspect in this case, Adobe simply hasn't updated the https://get.adobe.com/reader/ site to reflect that .20077 is in fact the latest version.
Let me start by saying thank you to @joe.farage, creator of this script, and to @millersc for his tweaks.
The script has been working great on the majority our machines in my school district. I have run into some that Fail to run the script successfully though. I am getting the following error:
Script result: Latest Version is: 15.010.20060 Adobe Reader DC is not installed ARCurrVersNormalized: 1501020060 Latest version of the URL is: http://ardownload.adobe.com/pub/adobe/reader/mac/AcrobatDC/1501020060/AcroRdrDC_1501020060_MUI.dmg 2016-04-05 15:11:59.144 defaults[18052:727655] The domain/default pair of (/Applications/Adobe Acrobat Reader DC.app/Contents/Info, CFBundleShortVersionString) does not exist Error running script: return code was 1.
It seems that the Adobe Reader.app is currently running on these machines at the time the policy is triggered. I am not a script writer; but how would you go about adding something in the script to first check for and close the app, and then continue with the rest of the script?
Any assistance would be appreciated. I have been going machine to machine using ARD to manually close Adobe Reader. Then I run a UNIX command from within ARD to force the JAMF policy to rerun the script successfully.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.