Anyone know of a PPAPI check / update script? I've searched all over with no luck.
Solved
PPAPI version check / update script?

Best answer by Wakko
Robert,
Try this out, it's what I've been using on my JumpStarts. It's something we found JAMFNation and been updating as needed.
By default, it will not install flash on a machine that does not have it so you can scope to All if you wish without worrying installing on a system which Flash is purposely kept off. If you would like to override this behavior and install Flash as part of a thin-imaging policy, then edit the script and remove the ## on the following lines.
Line 93 ##
Update_Flash
Line 116 ##
Update_Flash
Also, Lines 119-161, will set System Preferences > Flash > Updates to “Never Check for Updates".
1#!/bin/sh2## Created by Ariel Peralta - Carbon Technologies, 31-May-20163## Original by Peter Loobuyck, 26-Jan-20164## Inspired by https://jamfnation.jamfsoftware.com/discussion.html?id=76585## Update 15-Jan-20176## This scripts take into consideration new Adobe download URLs as per https://www.jamf.com/jamf-nation/discussions/7658/flash-update-script7## Removed old download URLs, shortver variable, and updated fileURL variables89## Name of the temporary dmg that will be created when Adobe Flash Installer is downloaded. 10## This file will be automatically created and deleted after installation11flash_dmg="/tmp/FlashInstaller.dmg"1213# Specify a /tmp/flash_update.XXXX mountpoint for the disk image14TMPMOUNT=`/usr/bin/mktemp -d /tmp/flash_update.XXXX`1516## This Function will take defined variables and install Flash17Update_Flash () {18 ## Compare the two versions, if they are different of Flash download and install the new version. 19 if [ "${currentinstalledver}" != "${latestver}" ]; then20 /bin/echo "`date`: Current Flash ${FlashType} version: ${currentinstalledver}"21 /bin/echo "`date`: Available Flash ${FlashType} version: ${latestver}"22 /bin/echo "`date`: Downloading newer ${FlashType} version."2324 # Download and Mount Flash Plugin disk image to /tmp/flash_update.XXXX mountpoint25 /usr/bin/curl -S -# -o "$flash_dmg" "$fileURL" 26 /bin/echo "`date`: Mounting installer disk image." 27 hdiutil attach "$flash_dmg" -mountpoint "$TMPMOUNT" -nobrowse -noverify -noautoopen2829 # Before installation, the installer's developer certificate is checked to30 # see if it has been signed by Adobe's developer certificate. Once the 31 # certificate check has been passed, the package is then installed.3233 if [[ "${pkg_path}" != "" ]]; then34 signature_check=`/usr/sbin/pkgutil --check-signature "$pkg_path" | awk /'Developer ID Installer/{ print $5 }'`35 if [[ ${signature_check} = "Adobe" ]]; then36 # Install Flash from the installer package stored inside the disk image37 /bin/echo "`date`: Installing..."38 /usr/sbin/installer -pkg "${pkg_path}" -target "/"39 fi40 fi4142 # Clean-up4344 # Unmount the Flash disk image from /tmp/flash_update.XXXX45 /bin/sleep 1046 /bin/echo "`date`: Unmounting installer disk image."47 /usr/bin/hdiutil detach -force "$TMPMOUNT"4849 # Remove the /tmp/flash_update.XXXX mountpoint 50 /bin/sleep 1051 /bin/echo "`date`: Deleting disk image."52 /bin/rm -rf "$TMPMOUNT"5354 # Remove the downloaded disk image55 /bin/rm -rf "$flash_dmg"5657 # Check to see if update was successful 58 newlyinstalledver=`/usr/bin/defaults read "${plugincheck}" CFBundleShortVersionString`59 if [ "${latestver}" = "${newlyinstalledver}" ]; then60 /bin/echo "`date`: SUCCESS: Flash ${FlashType} has been updated to version ${newlyinstalledver}"61 else62 /bin/echo "`date`: ERROR: Flash ${FlashType} update unsuccessful, version remains at ${currentinstalledver}."63 /bin/echo "--"64 fi6566 ## If Flash is up to date already, just log it and exit. 67 else68 /bin/echo "`date`: Flash ${FlashType} Plug-in is already up to date, running ${currentinstalledver}."69 /bin/echo "--"70 fi71}7273## Set NPAPI Variables74## Query Adobe Flash Updater XML page and return latest version in decimal form 75latestver=`/usr/bin/curl --silent http://fpdownload2.macromedia.com/get/flashplayer/update/current/xml/version_en_mac_pl.xml | awk -F " /"update version="/'{print $2}' | sed s/,/./g`76fileURL=https://fpdownload.adobe.com/get/flashplayer/pdc/"${latestver}"/install_flash_player_osx.dmg77plugincheck="/Library/Internet Plug-Ins/Flash Player.plugin/Contents/info"78pkg_path=$TMPMOUNT/Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg79FlashType=NPAPI8081## Check and get the version number of the currently-installed Flash Player NPAPI Plugin, if any.82if83 [ -e "${plugincheck}.plist" ]; then84 currentinstalledver=`/usr/bin/defaults read "${plugincheck}" CFBundleShortVersionString`85 ## Calling function to update NPAPI plugin86 Update_Flash87else88 /bin/echo "`date`: No Flash NPAPI Plug-in Installed."89 /bin/echo "--"90 currentinstalledver=none91 ## Remove ## From Line below if you want to force Flash Install on new systems during thin-imaging92## Update_Flash9394fi 9596## Set PPAPI Variables97latestver=`/usr/bin/curl --silent http://fpdownload2.macromedia.com/get/flashplayer/update/current/xml/version_en_mac_pep.xml | awk -F " /"update version="/'{print $2}' | sed s/,/./g`98fileURL=https://fpdownload.adobe.com/get/flashplayer/pdc/"${latestver}"/install_flash_player_osx_ppapi.dmg99plugincheck="/Library/Internet Plug-Ins/PepperFlashPlayer/PepperFlashPlayer.plugin/Contents/info"100pkg_path=$TMPMOUNT/Install Adobe Pepper Flash Player.app/Contents/Resources/Adobe Flash Player.pkg101FlashType=PPAPI102103## Check and get the version number of the currently-installed Flash Player PPAPI (Pepper) Plugin, if any.104if105 [ -e "${plugincheck}.plist" ]; then106 currentinstalledver=`/usr/bin/defaults read "${plugincheck}" CFBundleShortVersionString`107 ## Find latest version of Flash108 ## Calling function to update PPAPI plugin109 Update_Flash110else111 /bin/echo "`date`: No Flash PPAPI Plug-in Installed."112 /bin/echo "--"113 currentinstalledver=none114 ## Remove ## From Line below if you want to force Flash Install on new systems during thin-imaging115## Update_Flash 116fi117118# Configure Adobe Flash to *not* update119# This will set the preference for both NPAPI and PPAPI120#121# Modified by Ariel Peralta, 31-May-2016122# Modified by Carlos Echevarria, 7-Apr-2016123# Modified by Chris Jackson, 3-Mar-2016124# Original by Dan K. Snelson, 7-Nov-2014125#126# Inspired by Lance Berrier127# https://jamfnation.jamfsoftware.com/viewProfile.html?userID=12774128129directory="/Library/Application Support/Macromedia/"130file="/Library/Application Support/Macromedia/mms.cfg"131132if [ -f "$file" ] ; then133134 # Flash Player is installed, has been launched and mms.cfg exists135 # let's configure it to not update136137 grep -q -r "AutoUpdateDisable" "$file" && sed -i '' 's/AutoUpdateDisable=0|AutoUpdateDisable=1/AutoUpdateDisable=1/g' "$file" || echo "AutoUpdateDisable=1" >> "$file"138 grep -q -r "SilentAutoUpdateEnable" "$file" && sed -i '' 's/SilentAutoUpdateEnable=0|SilentAutoUpdateEnable=1/SilentAutoUpdateEnable=0/g' "$file" || echo "SilentAutoUpdateEnable=0" >> "$file"139 grep -q -r "DisableAnalytics" "$file" && sed -i '' 's/DisableAnalytics=0|DisableAnalytics=1/DisableAnalytics=1/g' "$file" || echo "DisableAnalytics=1" >> "$file"140141 RESULT="Configured Adobe Flash Update Preferences to Never Check for Updates"142143else144 ## Only create update override if flash is installed. If no flash is installed by this point, then leave alone.145 if [ -e "${plugincheck}.plist" ] ; then146 # mms.cfg doesn't exsist, but flash is installed147 mkdir "${directory}"148149 echo "AutoUpdateDisable=1" >> "$file"150 echo "SilentAutoUpdateEnable=0" >> "$file"151 echo "DisableAnalytics=1" >> "$file" 152153 RESULT="Created and configured Adobe Flash Update Preferences to Never Check for Updates"154155 else156 echo "No Plugin installed, no changes made to Adobe Flash Update Preferences"157 fi158fi159160echo "$RESULT"
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.