Deleted old cringey script , the real one is below.
- Home
- Community
- Get Support
- General Discussions
- Flash Update Script
90 replies
- Legendary Contributor
- 4293 replies
- June 21, 2016

- Valued Contributor
- 401 replies
- June 21, 2016
@thatsmyjamf If I modify...
latestver=`/usr/bin/curl -s http://www.adobe.com/software/flash/about/ | sed -n '/Safari/,/</tr/s/[^>]*>([0-9].*)<.*/1/p'`
with...
latestver=`/usr/bin/curl -s http://www.adobe.com/software/flash/about/ | sed -n '/Safari/,/</tr/s/[^>]*>([0-9].*)<.*/1/p' | awk 'NR1==1{print $1; exit}'`
I get an empty response.
- Valued Contributor
- 215 replies
- June 21, 2016
I apologize for not knowing the original author of the flash script I use, but this works for me still with 10.9 and newer:
latestver=`curl -s http://www.adobe.com/software/flash/about/ | grep -A4 "Macintosh" | grep -A1 "Safari" | sed -e 's/<[^>][^>]*>//g' -e '/^ *$/d' | tail -n 1 | awk '{print $1}' | tr -d "
"`
- Legendary Contributor
- 7880 replies
- June 21, 2016
Its been a while since I posted to this thread, but looking at it again, I'm wondering is there's any reason you aren't using the official Flash Player xml file for grabbing the latest version? Scraping a webpage with curl and trying to glean out the version string isn't very reliable. I should know as I have a few products I've needed to do that with in scripts because the vendor doesn't supply an official update xml or sparkle feed. Pain in the butt to get the current version string from these. And there's no knowing when the vendor will suddenly redesign their page and break your script.
FWIW, here is the official xml file that FlashPlayer actually uses to know there's an update. AutoPkg uses this same URL just so you know, so its reliable (as long as Adobe updates it in a timely manner at least)
http://fpdownload2.macromedia.com/get/flashplayer/update/current/xml/version_en_mac_pl.xml
If you need a different language xml, it shouldn't be too difficult to locate then simply by changing the "en_" in the above to something else, like "es_" for Spanish for example and trying the address in your browser.
The current version string shows up in the <update version= key right near the top and is easy to awk or grep out of the results. It does show up with commas instead of periods, but that's easy to change with sed or tr.
Example:
curl -sS http://fpdownload2.macromedia.com/get/flashplayer/update/current/xml/version_en_mac_pl.xml | xmllint --format - | awk -F'"' '/update version/{print $2}' | sed 's/,/./g'
The above prints back:
22.0.0.192

- Valued Contributor
- 401 replies
- June 21, 2016
Assuming that both the PPAPI and NPAPI are updated to the same version, I've updated the script with @MattCrawford's updates and even @mm2270's xml curl so that it updates both the NPAPI and the PPAPI.
I'm worried though if they don't update both to the same version at the same time though.
#!/bin/bash
dmgfile="flash.dmg"
volname="Flash"
logfile="/Library/Logs/FlashUpdateScript.log"
# Get the version number of the currently-installed Flash Player, if any.
latestver=`/usr/bin/curl -sS http://fpdownload2.macromedia.com/get/flashplayer/update/current/xml/version_en_mac_pl.xml | xmllint --format - | awk -F'"' '/update version/{print $2}' | sed 's/,/./g'`
# The downloads only use the major version number, so shorten it for the download
shortver=${latestver:0:2}
# Here are the URLs for the downloads
NPAPIurl=http://fpdownload.macromedia.com/get/flashplayer/current/licensing/mac/install_flash_player_"${shortver}"_osx.dmg
if [ -e /Library/Internet Plug-Ins/Flash Player.plugin/Contents/Info.plist ];then
currentinstalledNPAPI=`/usr/bin/defaults read /Library/Internet Plug-Ins/Flash Player.plugin/Contents/Info.plist CFBundleShortVersionString`
else
currentinstalledNPAPI="0"
fi
PPAPIurl=https://fpdownload.macromedia.com/get/flashplayer/current/licensing/mac/install_flash_player_"${shortver}"_osx_ppapi_pkg.dmg
if [ -e /Library/Internet Plug-Ins/PepperFlashPlayer/PepperFlashPlayer.plugin/Contents/Info.plist ];then
currentinstalledPPAPI=`/usr/bin/defaults read /Library/Internet Plug-Ins/PepperFlashPlayer/PepperFlashPlayer.plugin/Contents/Info.plist CFBundleShortVersionString`
else
currentinstalledPPAPI="0"
fi
# Compare the two NPAPI versions, if they are different of Flash is not present then download and install the new version.
if [ "${currentinstalledNPAPI}" != "${latestver}" ]; then
/bin/echo "`date`: Current NPAPI Flash version: ${currentinstalledNPAPI}" >> ${logfile}
/bin/echo "`date`: Available NPAPI Flash version: ${latestver}" >> ${logfile}
/bin/echo "`date`: Downloading newer NPAPI version." >> ${logfile}
/usr/bin/curl -s -o `/usr/bin/dirname $0`/flash.dmg $NPAPIurl
/bin/echo "`date`: Mounting NPAPI installer disk image." >> ${logfile}
/usr/bin/hdiutil attach `dirname $0`/flash.dmg -nobrowse -quiet
/bin/echo "`date`: Installing..." >> ${logfile}
/usr/sbin/installer -pkg /Volumes/Flash Player/Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg -target / > /dev/null
/bin/sleep 10
/bin/echo "`date`: Unmounting installer disk image." >> ${logfile}
/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep ${volname} | awk '{print $1}') -quiet
/bin/sleep 10
/bin/echo "`date`: Deleting disk image." >> ${logfile}
/bin/rm `/usr/bin/dirname $0`/${dmgfile}
newlyinstalledNPAPI=`/usr/bin/defaults read "/Library/Internet Plug-Ins/Flash Player.plugin/Contents/version" CFBundleShortVersionString`
if [ "${latestver}" = "${newlyinstalledNPAPI}" ]; then
/bin/echo "`date`: SUCCESS: NPAPI Flash has been updated to version ${newlyinstalledNPAPI}" >> ${logfile}
else
/bin/echo "`date`: ERROR: NPAPI Flash update unsuccessful, version remains at ${currentinstalledNPAPI}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi
# If Flash is up to date already, just log it and exit.
else
/bin/echo "`date`: Flash NPAPI is already up to date, running ${currentinstalledNPAPI}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi
# Compare the two PPAPI versions, if they are different of Flash is not present then download and install the new version.
if [ "${currentinstalledPPAPI}" != "${latestver}" ]; then
/bin/echo "`date`: Current PPAPI Flash version: ${currentinstalledPPAPI}" >> ${logfile}
/bin/echo "`date`: Available PPAPI Flash version: ${latestver}" >> ${logfile}
/bin/echo "`date`: Downloading newer PPAPI version." >> ${logfile}
/usr/bin/curl -s -o `/usr/bin/dirname $0`/flash.dmg $PPAPIurl
/bin/echo "`date`: Mounting PPAPI installer disk image." >> ${logfile}
/usr/bin/hdiutil attach `dirname $0`/flash.dmg -nobrowse -quiet
/bin/echo "`date`: Installing..." >> ${logfile}
/usr/sbin/installer -pkg /Volumes/Flash Player/Install Adobe Pepper Flash Player.pkg -target / > /dev/null
/bin/sleep 10
/bin/echo "`date`: Unmounting installer disk image." >> ${logfile}
/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep ${volname} | awk '{print $1}') -quiet
/bin/sleep 10
/bin/echo "`date`: Deleting disk image." >> ${logfile}
/bin/rm `/usr/bin/dirname $0`/${dmgfile}
newlyinstalledPPAPI=`/usr/bin/defaults read /Library/Internet Plug-Ins/PepperFlashPlayer/PepperFlashPlayer.plugin/Contents/Info.plist CFBundleShortVersionString`
if [ "${latestver}" = "${newlyinstalledPPAPI}" ]; then
/bin/echo "`date`: SUCCESS: PPAPI Flash has been updated to version ${newlyinstalledPPAPI}" >> ${logfile}
else
/bin/echo "`date`: ERROR: PPAPI Flash update unsuccessful, version remains at ${currentinstalledPPAPI}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi
# If Flash is up to date already, just log it and exit.
else
/bin/echo "`date`: PPAPI Flash is already up to date, running ${currentinstalledPPAPI}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi
exit
- Jamf Heroes
- 67 replies
- June 22, 2016
I adjusted the script I wrote a bit. Seems some changes were made by Adobe.
Anyway, the reason why you can't use the xmll is that it regularly changes. That's the main reason why this script is more or less in use since 10.9. Besides I would never update flash in two version, already having problems updating one...
So here's the new version of the script:
#!/bin/sh
dmgfile="flash.dmg"
volname="Flash"
logfile="/Library/Logs/FlashUpdateScript.log"
#
latestver=`/usr/bin/curl -s http://www.adobe.com/software/flash/about/ | sed -n '/Safari/,/</tr/s/[^>]*>([0-9].*)<.*/1/p' | head -1`
# Get the version number of the currently-installed Flash Player, if any.
shortver=${latestver:0:2}
url=http://fpdownload.macromedia.com/get/flashplayer/current/licensing/mac/install_flash_player_"${shortver}"_osx.dmg
currentinstalledver=`/usr/bin/defaults read "/Library/Internet Plug-Ins/Flash Player.plugin/Contents/version" CFBundleShortVersionString`
#else
# currentinstalledver="none"
#fi
# Compare the two versions, if they are different of Flash is not present then download and install the new version.
if [ "${currentinstalledver}" != "${latestver}" ]; then
/bin/echo "`date`: Current Flash version: ${currentinstalledver}" >> ${logfile}
/bin/echo "`date`: Available Flash version: ${latestver}" >> ${logfile}
/bin/echo "`date`: Downloading newer version." >> ${logfile}
/usr/bin/curl -s -o `/usr/bin/dirname $0`/flash.dmg $url
/bin/echo "`date`: Mounting installer disk image." >> ${logfile}
/usr/bin/hdiutil attach `dirname $0`/flash.dmg -nobrowse -quiet
/bin/echo "`date`: Installing..." >> ${logfile}
/usr/sbin/installer -pkg /Volumes/Flash Player/Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg -target / > /dev/null
/bin/sleep 10
/bin/echo "`date`: Unmounting installer disk image." >> ${logfile}
/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep ${volname} | awk '{print $1}') -quiet
/bin/sleep 10
/bin/echo "`date`: Deleting disk image." >> ${logfile}
/bin/rm `/usr/bin/dirname $0`/${dmgfile}
newlyinstalledver=`/usr/bin/defaults read "/Library/Internet Plug-Ins/Flash Player.plugin/Contents/version" CFBundleShortVersionString`
if [ "${latestver}" = "${newlyinstalledver}" ]; then
/bin/echo "`date`: SUCCESS: Flash has been updated to version ${newlyinstalledver}" >> ${logfile}
else
/bin/echo "`date`: ERROR: Flash update unsuccessful, version remains at ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi
# If Flash is up to date already, just log it and exit.
else
/bin/echo "`date`: Flash is already up to date, running ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi

- New Contributor
- 8 replies
- June 22, 2016
@cwaldrip - My apologies for the delay in response. My previous reply was actually my first here on JAMF Nation, and the moderator approval took a while :)
I goofed up the line. It should be as follows:
latestver=`/usr/bin/curl -s http://www.adobe.com/software/flash/about/ | sed -n '/Safari/,/</tr/s/[^>]*>([0-9].*)<.*/1/p' | grep 2 | awk 'NR==1{print $1; exit}'`
Below is the full text of the updated script we used on our Yosemite/El Cap Macs:
#!/bin/sh
dmgfile="flash.dmg"
volname="Flash"
logfile="/Library/Logs/FlashUpdateScript.log"
latestver=`/usr/bin/curl -s http://www.adobe.com/software/flash/about/ | sed -n '/Safari/,/</tr/s/[^>]*>([0-9].*)<.*/1/p' | grep 2 | awk 'NR==1{print $1; exit}'`
# Get the version number of the currently-installed Flash Player, if any.
shortver=${latestver:0:2}
url=http://fpdownload.macromedia.com/get/flashplayer/current/licensing/mac/install_flash_player_"${shortver}"_osx.dmg
currentinstalledver=`/usr/bin/defaults read "/Library/Internet Plug-Ins/Flash Player.plugin/Contents/version" CFBundleShortVersionString`
#else
# currentinstalledver="none"
#fi
# Compare the two versions, if they are different of Flash is not present then download and install the new version.
if [ "${currentinstalledver}" != "${latestver}" ]; then
/bin/echo "`date`: Current Flash version: ${currentinstalledver}" >> ${logfile}
/bin/echo "`date`: Available Flash version: ${latestver}" >> ${logfile}
/bin/echo "`date`: Downloading newer version." >> ${logfile}
/usr/bin/curl -s -o `/usr/bin/dirname $0`/flash.dmg $url
/bin/echo "`date`: Mounting installer disk image." >> ${logfile}
/usr/bin/hdiutil attach `dirname $0`/flash.dmg -nobrowse -quiet
/bin/echo "`date`: Installing..." >> ${logfile}
/usr/sbin/installer -pkg /Volumes/Flash Player/Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg -target / > /dev/null
/bin/sleep 10
/bin/echo "`date`: Unmounting installer disk image." >> ${logfile}
/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep ${volname} | awk '{print $1}') -quiet
/bin/sleep 10
/bin/echo "`date`: Deleting disk image." >> ${logfile}
/bin/rm `/usr/bin/dirname $0`/${dmgfile}
newlyinstalledver=`/usr/bin/defaults read "/Library/Internet Plug-Ins/Flash Player.plugin/Contents/version" CFBundleShortVersionString`
if [ "${latestver}" = "${newlyinstalledver}" ]; then
/bin/echo "`date`: SUCCESS: Flash has been updated to version ${newlyinstalledver}" >> ${logfile}
else
/bin/echo "`date`: ERROR: Flash update unsuccessful, version remains at ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi
# If Flash is up to date already, just log it and exit.
else
/bin/echo "`date`: Flash is already up to date, running ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi

- New Contributor
- 8 replies
- June 22, 2016
@cwaldrip - My apologies for the delay in response. My previous reply was actually my first here on JAMF Nation, and the moderator approval took a while :)
I goofed up the line. It should be as follows:
latestver=`/usr/bin/curl -s http://www.adobe.com/software/flash/about/ | sed -n '/Safari/,/</tr/s/[^>]*>([0-9].*)<.*/1/p' | grep 2 | awk 'NR==1{print $1; exit}'`
Below is the full text of the updated script we used on our Yosemite/El Cap Macs:
#!/bin/sh
dmgfile="flash.dmg"
volname="Flash"
logfile="/Library/Logs/FlashUpdateScript.log"
latestver=`/usr/bin/curl -s http://www.adobe.com/software/flash/about/ | sed -n '/Safari/,/</tr/s/[^>]*>([0-9].*)<.*/1/p' | grep 2 | awk 'NR==1{print $1; exit}'`
# Get the version number of the currently-installed Flash Player, if any.
shortver=${latestver:0:2}
url=http://fpdownload.macromedia.com/get/flashplayer/current/licensing/mac/install_flash_player_"${shortver}"_osx.dmg
currentinstalledver=`/usr/bin/defaults read "/Library/Internet Plug-Ins/Flash Player.plugin/Contents/version" CFBundleShortVersionString`
#else
# currentinstalledver="none"
#fi
# Compare the two versions, if they are different of Flash is not present then download and install the new version.
if [ "${currentinstalledver}" != "${latestver}" ]; then
/bin/echo "`date`: Current Flash version: ${currentinstalledver}" >> ${logfile}
/bin/echo "`date`: Available Flash version: ${latestver}" >> ${logfile}
/bin/echo "`date`: Downloading newer version." >> ${logfile}
/usr/bin/curl -s -o `/usr/bin/dirname $0`/flash.dmg $url
/bin/echo "`date`: Mounting installer disk image." >> ${logfile}
/usr/bin/hdiutil attach `dirname $0`/flash.dmg -nobrowse -quiet
/bin/echo "`date`: Installing..." >> ${logfile}
/usr/sbin/installer -pkg /Volumes/Flash Player/Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg -target / > /dev/null
/bin/sleep 10
/bin/echo "`date`: Unmounting installer disk image." >> ${logfile}
/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep ${volname} | awk '{print $1}') -quiet
/bin/sleep 10
/bin/echo "`date`: Deleting disk image." >> ${logfile}
/bin/rm `/usr/bin/dirname $0`/${dmgfile}
newlyinstalledver=`/usr/bin/defaults read "/Library/Internet Plug-Ins/Flash Player.plugin/Contents/version" CFBundleShortVersionString`
if [ "${latestver}" = "${newlyinstalledver}" ]; then
/bin/echo "`date`: SUCCESS: Flash has been updated to version ${newlyinstalledver}" >> ${logfile}
else
/bin/echo "`date`: ERROR: Flash update unsuccessful, version remains at ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi
# If Flash is up to date already, just log it and exit.
else
/bin/echo "`date`: Flash is already up to date, running ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi

- Contributor
- 57 replies
- June 27, 2016
@thatsmyjamf There's always so many ways to write this stuff but I think you'd be able to shorten your variable from:
latestver=`/usr/bin/curl -s http://www.adobe.com/software/flash/about/ | sed -n '/Safari/,/</tr/s/[^>]*>([0-9].*)<.*/1/p' | grep 2 | awk 'NR==1{print $1; exit}'`
down to:
latestver=`/usr/bin/curl -s http://www.adobe.com/software/flash/about/ | sed -n '/Safari/,/</tr/s/[^>]*>([0-9].*)<.*/1/p' | head -1`
I found multiple results issue a little while back as well so I just added that and it was good to go.
thanks for the script as a whole, though, it's saved me so much time!
Chris

- New Contributor
- 8 replies
- June 28, 2016
@cgiordano - I love it! Thanks for the update. I am always trying to hone my awk/sed skillsets. This forum post has been a tremendous help.

- Contributor
- 57 replies
- June 28, 2016
@thatsmyjamf Sure thing, glad to help. For the record, I love awk and abhor sed :P

- Valued Contributor
- 401 replies
- January 10, 2017
It looks like Adobe has changed the download URLs. The script is unable to get the latest NPAPI or PPAPI updates from the script...
http://fpdownload.macromedia.com/get/flashplayer/current/licensing/mac/install_flash_player_"${shortver}"_osx.dmg
i.e. http://fpdownload.macromedia.com/get/flashplayer/current/licensing/mac/install_flash_player_24_osx.dmg
- Jamf Heroes
- 67 replies
- January 11, 2017
Allright guys, just checked and updated the script:
#!/bin/sh -x
#####################################################################################################
#
# ABOUT THIS PROGRAM
#
# NAME
# UpdateFlash.sh -- Installs or updates Adobe Flash Player
#
#
####################################################################################################
#
# Peter Loobuyck grabbed bits from the net
#
####################################################################################################
dmgfile="flash.dmg"
volname="Flash"
logfile="/Library/Logs/jamf.log"
#
latestver=`/usr/bin/curl -s http://www.adobe.com/software/flash/about/ | sed -n '/Safari/,/</tr/s/[^>]*>([0-9].*)<.*/1/p' | head -1`
# Get the version number of the currently-installed Flash Player, if any.
shortver=${latestver:0:2}
url=https://fpdownload.adobe.com/get/flashplayer/pdc/"${latestver}"/install_flash_player_osx.dmg
currentinstalledver=`/usr/bin/defaults read "/Library/Internet Plug-Ins/Flash Player.plugin/Contents/version" CFBundleShortVersionString`
#else
# currentinstalledver="none"
#fi
# Compare the two versions, if they are different of Flash is not present then download and install the new version.
if [ "${currentinstalledver}" != "${latestver}" ]; then
/bin/echo "`date`: Current Flash version: ${currentinstalledver}" >> ${logfile}
/bin/echo "`date`: Available Flash version: ${latestver}" >> ${logfile}
/bin/echo "`date`: Downloading newer version." >> ${logfile}
/usr/bin/curl -s -o `/usr/bin/dirname $0`/flash.dmg $url
/bin/echo "`date`: Mounting installer disk image." >> ${logfile}
/usr/bin/hdiutil attach `dirname $0`/flash.dmg -nobrowse -quiet
/bin/echo "`date`: Installing..." >> ${logfile}
/usr/sbin/installer -pkg /Volumes/Flash Player/Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg -target / > /dev/null
/bin/sleep 10
/bin/echo "`date`: Unmounting installer disk image." >> ${logfile}
/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep ${volname} | awk '{print $1}') -quiet
/bin/sleep 10
/bin/echo "`date`: Deleting disk image." >> ${logfile}
/bin/rm `/usr/bin/dirname $0`/${dmgfile}
newlyinstalledver=`/usr/bin/defaults read "/Library/Internet Plug-Ins/Flash Player.plugin/Contents/version" CFBundleShortVersionString`
if [ "${latestver}" = "${newlyinstalledver}" ]; then
/bin/echo "`date`: SUCCESS: Flash has been updated to version ${newlyinstalledver}" >> ${logfile}
else
/bin/echo "`date`: ERROR: Flash update unsuccessful, version remains at ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi
# If Flash is up to date already, just log it and exit.
else
/bin/echo "`date`: Flash is already up to date, running ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
fi

- Contributor
- 39 replies
- January 11, 2017
Wow! Thanks everyone. This fell into the "exactly what I was looking for" category.

- Valued Contributor
- 401 replies
- January 11, 2017
Figured out where the PPAPI url is...
https://fpdownload.adobe.com/get/flashplayer/pdc/"${latestver}"/install_flash_player_osx_ppapi.dmg

- New Contributor
- 2 replies
- January 11, 2017
Can this be run through self service? We put it in as a script but the self service quits with no error messages in the jamf.log
- Jamf Heroes
- 67 replies
- January 12, 2017
Hi @SMMC ,
I have this running in a recurring policy and seems to work fine. can you check your logs on the JSS to see what's wrong?
Cheers Peter

- Valued Contributor
- 401 replies
- January 12, 2017
@SMMC We have it setup as a self service item and it works fine.
- Legendary Contributor
- 7880 replies
- January 13, 2017
Just a FWIW, since I've been monitoring this thread, my own update script continues to work to identify the current Flash Player plugin version and the download location (and downloading and installing it of course) It may be because my method is using Adobe's own distribution download URL you obtain when you sign up for distribution, to get the current release location. Maybe that's the trick going forward to prevent things from breaking. I haven't changed anything with my script in a number of months so I didn't need to make any adjustments to be able to update Flash.

- Honored Contributor
- 1054 replies
- January 13, 2017
I signed up a second time as the fist link I had when Adobe told everyone that they were going to change stopped working. The new link takes me to a master page with all the download links.
I select the "Download DMG Installer (for System Administrators)" link and that will download the .pkg installer, however I can not "curl" that link.
Also there are I think two threads about this and two different links are working plus mm2270 original link ... I am confused and this really isn't rocket science...
I have no way of knowing what link will work next when there is another update : )
C
- Legendary Contributor
- 7880 replies
- January 13, 2017
I select the "Download DMG Installer (for System Administrators)" link and that will download the .pkg installer, however I can not "curl" that link.
Yes its possible to curl that link. I'm doing it in my script. The trick is to include the -L
flag since that is a redirect link. The -L
flag for curl asks curl to follow redirects when it encounters them. Try the following as an example:
curl --connect-timeout 8 --max-time 8 -sfL "Adobe_Dist_URL_Goes_Here" | awk -F'"' '/Download DMG.*for System Administrators/{print $2}' | grep "adobedist" | grep "osx_pkg"
Of course, change the "Adobe_Dist_URL_Goes_Here" to your actual distribution URL. The one that gives you that full listing.
This will, or should, give you the full download path to the installer DMG. Although note the address it returns includes your unique distribution UID in the string. It still works to curl that down to a machine though.
If you want to get the PPAPi version download URL, just change the last grep to:
grep "osx_ppapi_pkg"
Just a note. You may need to adjust the --connect-timeout
and --max-time
integers (these are in seconds) I had to add those because Adobe's distribution page is woefully slow to load, even over curl. So these help make sure curl doesn't give up too early, or hang indefinitely trying to accessing the page. Not sure why a company with a billion plus in revenue can't make their pages load a bit faster, but whatever.

- New Contributor
- 343 replies
- January 13, 2017
Or you could make use of the assistance of hundreds of other interested Mac admins and use autopkg...
http://autopkg.github.io/autopkg/

- Contributor
- 57 replies
- January 13, 2017
@peterloobuyck First, thanks for updating the script with the correct URL for NPAPI so quickly. Second, due to my own inexperience, I'm not sure how you were able to deduce the newest URL so quickly. For my own education, would you be able to explain that to me?
@gregneagle Unfortunately, not all organizations are allowed to us AutoPKG due to the fact that it's open source software. My company's privacy policy is pretty strict and if the open source developer doesn't have a privacy statement I'm not allowed to even think about using the software. It works for most orgs but not all.
Reply
Most helpful members this week
- mvu
32 likes
- mattjerome
20 likes
- ThomM
19 likes
- Chubs
15 likes
- SlipStream
14 likes
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Scanning file for viruses.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
OKThis file cannot be downloaded
Sorry, our virus scanner detected that this file isn't safe to download.
OKCookie policy
We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.
Cookie settings
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.