Posted on 02-21-2014 08:03 AM
Hello,
We are trying to push out the Follett Digital Reader application to our Macs and are wondering what is the best way to distribute Adobe Air? For Flash we pull out the PKG file and use that push out updates, but Air doesn't seem to have that type of install. Right now we just used Composer to capture the install and that seems to be working. Just wondering if there is a better method.
Thanks, Tim
Posted on 02-21-2014 09:03 AM
Use Composer to create a .DMG that holds the Adobe AIR Installer.app. Place it in /Users/Shared to allow manual install if necessary. But you could just as easily place it in /tmp if you don't want your users to see it.
Then we apply this postflight script:
#!/bin/bash
/Users/Shared/Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer -silent -eulaAccepted
Extracted from:
https://jamfnation.jamfsoftware.com/discussion.html?id=7152
Posted on 02-21-2014 09:53 AM
Thanks, that looks great. Wonder why that didn't show up in my searching. Guess "Adobe" and "Air" are a bit too common.
Posted on 02-21-2014 10:27 AM
Another option would be to use AutoPkg: http://autopkg.github.io/autopkg/
The AdobeAIR.pkg grabs the latest Adobe AIR release and creates a deployable package.
autopkg run AdobeAIR.pkg
The "silent" install method referenced above works unless the machine is at the loginwindow at the time of install.
Posted on 03-05-2014 09:22 AM
I just installed AutoPkg and tried using it to create the Adobe Air package. It gets created with the basic files, bu when I install it on a computer my Air application won't run. The application opens, but then instantly closes. I checked, and all of the Air files are there, but something else is missing.
Next I'll try the silent install method.
Though, for now, my Composer DMG is working. Just looking for something a little easier to update when new versions come along.
Posted on 03-10-2014 11:00 AM
Check the permissions on the AutoPKG-created one - ran into that once, have a postinstall shell script which fixes them.
IIRC it's mostly /Library/Frameworks/AdobeAIR.framework and the app installer/uninstaller in /Applications/Utilities...
Posted on 06-20-2014 08:40 AM
Bump...Finally trying AutoPKG to get a usable pkg for Adobe AIR - however, when I run it the recipe fails:
Error in com.github.autopkg.pkg.AdobeAIR: Processor: Copier: Error: /Users/ckemp/Library/AutoPkg/Cache/com.github.autopkg.pkg.AdobeAIR/downloads/AdobeAIR.dmg is not mounted
Even if I manually mount the .dmg from this location it still gives this error. Anyone ever see this?
Posted on 03-16-2015 08:05 AM
Hi all,
You can try using this script to install or update Adobe AIR. No need to package anything. It automatically downloads the latest version online. I hope it helps ;)
Best regards,
joe
#!/bin/sh
#####################################################################################################
#
# ABOUT THIS PROGRAM
#
# NAME
# AdobeAIRUpdate.sh -- Installs or updates Adobe AIR
#
# SYNOPSIS
# sudo AdobeAIRUpdate.sh
#
####################################################################################################
#
# HISTORY
#
# Version: 1.0
#
# - Joe Farage, 16.03.2015
#
####################################################################################################
# Script to download and install Adobe AIR.
# Only works on Intel systems.
dmgfile="AdobeAIR.dmg"
logfile="/Library/Logs/AdobeAIRUpdateScript.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 AIR available from Adobe's About AIR page.
latestver=`/usr/bin/curl -s -A "$userAgent" https://get.adobe.com/air/ | /usr/bin/grep "<strong>Version" | /usr/bin/sed -e 's/<[^>][^>]*>//g' -e '/^ *$/d' | /usr/bin/awk '{print $2}'`
echo "Latest Version is: $latestver"
# Get the version number of the currently-installed Adobe AIR, if any.
if [ -e "/Applications/Utilities/Adobe AIR Application Installer.app" ]; then
currentinstalledver=`/usr/bin/defaults read /Applications/Utilities/Adobe AIR Application Installer.app/Contents/Info CFBundleShortVersionString`
echo "Current installed version is: $currentinstalledver"
if [ ${latestver} = ${currentinstalledver} ]; then
echo "Adobe AIR is current. Exiting"
exit 0
fi
else
currentinstalledver="none"
echo "Adobe AIR is not installed"
fi
ARCurrVersNormalized=$( echo $latestver | sed 's/[.]//g' )
ARCurrMajVers=$( echo $latestver | cut -d. -f1 )
url=""
url1="http://airdownload.adobe.com/air/mac/download/${latestver}"
url2="/AdobeAIR.dmg"
#Build URL
url=`echo "${url1}${url2}"`
echo "Latest version of the URL is: $url"
# Compare the two versions, if they are different or Adobe AIR is not present then download and install the new version.
if [ "${currentinstalledver}" != "${latestver}" ]; then
/bin/echo "`date`: Current AIR version: ${currentinstalledver}" >> ${logfile}
/bin/echo "`date`: Available AIR version: ${latestver}" >> ${logfile}
/bin/echo "`date`: Downloading newer version." >> ${logfile}
/usr/bin/curl -s -o /tmp/AdobeAIR.dmg ${url}
/bin/echo "`date`: Mounting installer disk image." >> ${logfile}
/usr/bin/hdiutil attach /tmp/AdobeAIR.dmg -nobrowse -quiet
/bin/echo "`date`: Installing..." >> ${logfile}
/Volumes/Adobe AIR/Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer -silent
/bin/sleep 10
/bin/echo "`date`: Unmounting installer disk image." >> ${logfile}
/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep Adobe AIR | 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/Utilities/Adobe AIR Application Installer.app/Contents/Info CFBundleShortVersionString`
if [ "${latestver}" = "${newlyinstalledver}" ]; then
/bin/echo "`date`: SUCCESS: Adobe AIR has been updated to version ${newlyinstalledver}" >> ${logfile}
# /Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType hud -title "Adobe AIR Updated" -description "Adobe AIR has been updated." &
else
/bin/echo "`date`: ERROR: Adobe AIR update unsuccessful, version remains at ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
exit 1
fi
# If Adobe AIR is up to date already, just log it and exit.
else
/bin/echo "`date`: Adobe AIR 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
Posted on 03-16-2015 12:10 PM
Thanks @joe.farage! This script is AWESOME!
Posted on 09-04-2015 01:40 PM
@joe.farage: I am using your script to install Air (my users need to use the claromentis document editor). After running the script runs successfully, Air seems to be installed, frameworks files are there, but the apps don't seem to detect it in browser (Chrome, Safari, I'm just prompted to run the Air installer again). If I manually run the installer, Air is recognized... Any ideas? The script seems to be installing an unusable instance of Air. Anyone else seen this?
Posted on 09-05-2015 10:28 AM
I'd recommend doing a double take on anything requiring Flash or AIR installs. If there is no alternative are possible, I would at least contact the vendor and request them to get to commit to a native, proper App for OS X and in the meantime move to a captive runtime bundle for their software. This would remove the need to install and update AIR on the systems. AIR is dependant on Flash which means it is deprecated (and large security hole, requiring constant updates). In a captive runtime sandboxed App, you'd be in a better position than installing AIR on all systems.
Posted on 09-14-2015 06:38 AM
@laxthxdude: No doubt, I agree with you. Unfortunately no one in my company considers such things before investing heavily in tech. I need get AIR installed via a script or package. If anyone else has had similar difficulties and overcome them, I'd love to hear it.
Posted on 09-16-2015 02:30 AM
Why you don't use AutoPKG
AutoPkg is an automation framework for OS X software packaging and distribution, oriented towards the tasks one would normally perform manually to prepare third-party software for mass deployment to managed clients.
It's very easy to setup and there are many repositories including one which will create an actual Adobe Air package for you (version 18.00.199).
Posted on 03-11-2016 07:53 AM
Whenever we attempt to run this .sh we get this error, I'm sure where to start looking to resolve this issue.
Any assistance would be awesome. Thanks!
Posted on 03-11-2016 08:31 AM
In your script, look for line 71. Try this line in it's place:
/Volumes/Adobe AIR/Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer -silent -eulaAccepted
I'm running a modified version of Joe's script. This was one of the tweaks.
Posted on 03-11-2016 08:37 AM
We packaged the AdobeAirInstall.app into a .pkg and dropped it into /Library/Company/. We then ran an "After" script to install it.
We have an app called Scratch that uses Adobe Air, here's an example of what we do.
#Copy Adobe Air Installer to #Library #Scratch
/usr/local/jamf/bin/jamf policy -trigger InstallAdobeAir
#
#Accept Adobe Air EULA and install silently
/Library/Company/Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer -silent -eulaAccepted
#
#Install Scratch silently
/usr/local/jamf/bin/jamf policy -trigger InstallScratch
#
#Delete Adobe Air Intaller
rm -rf /Library/Company/Adobe AIR Installer.app
#
echo "Scratch Installed"
Posted on 03-11-2016 08:49 AM
This is the error that now occurs after making the change that @millersc suggested.
Posted on 03-11-2016 09:02 AM
How are you editing the script? looks like bad character. Could try putting that line in " " and remove the back slashes.
Posted on 03-30-2016 04:23 AM
Hi, I am trying the above script and receiving the following error:
Script result: Latest Version is: 21.0
Current installed version is: 16.0
Latest version of the URL is: http://airdownload.adobe.com/air/mac/download/21.0/AdobeAIR.dmg
/Library/Application Support/JAMF/tmp/Install Adobe Air Updates v2: line 71: /Volumes/Adobe AIR/Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer: No such file or directory
I have added the additional -eulaAccepted to the script as instructed above, but it looks like the .dmg is not mounting, if I have the Adobe Air installer mounted on the desktop it works fine?
Many thanks
Posted on 04-13-2016 03:46 AM
If you are getting the error "No such file or directory", the cause is that script doesn't work properly as of this moment, as the AKAMAI servers are responding with "301 Moved Permanently" to the AdobeAIR.dmg file.
If you allow redirections in the curl download, then the script will work fine (your discretion if you consider this to be a security issue or not).
You can fix this by adding -L to the curl command so it'll handle relocations, so the line with the download command:
/usr/bin/curl -s -o /tmp/AdobeAIR.dmg ${url}
Will be replaced to this:
/usr/bin/curl -s -L -o /tmp/AdobeAIR.dmg ${url}
And then the script will download the AdobeAIR.dmg properly and it can perform the install.
Posted on 05-26-2016 08:01 AM
Confirmed that including the changes noted above by @millersc and @Ongelmanratkoja gets the script functional again (included in the below):
#!/bin/sh
#####################################################################################################
#
# ABOUT THIS PROGRAM
#
# NAME
# AdobeAIRUpdate.sh -- Installs or updates Adobe AIR
#
# SYNOPSIS
# sudo AdobeAIRUpdate.sh
#
####################################################################################################
#
# HISTORY
#
# Version: 1.0
#
# - Joe Farage, 16.03.2015, SITeL - Etat de Fribourg
#
####################################################################################################
# Script to download and install Adobe AIR.
# Only works on Intel systems.
dmgfile="AdobeAIR.dmg"
logfile="/Library/Logs/AdobeAIRUpdateScript.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 AIR available from Adobe's About AIR page.
latestver=`/usr/bin/curl -s -A "$userAgent" https://get.adobe.com/air/ | /usr/bin/grep "<strong>Version" | /usr/bin/sed -e 's/<[^>][^>]*>//g' -e '/^ *$/d' | /usr/bin/awk '{print $2}'`
echo "Latest Version is: $latestver"
# Get the version number of the currently-installed Adobe AIR, if any.
if [ -e "/Applications/Utilities/Adobe AIR Application Installer.app" ]; then
currentinstalledver=`/usr/bin/defaults read /Applications/Utilities/Adobe AIR Application Installer.app/Contents/Info CFBundleShortVersionString`
echo "Current installed version is: $currentinstalledver"
if [ ${latestver} = ${currentinstalledver} ]; then
echo "Adobe AIR is current. Exiting"
exit 0
fi
else
currentinstalledver="none"
echo "Adobe AIR is not installed"
fi
ARCurrVersNormalized=$( echo $latestver | sed 's/[.]//g' )
ARCurrMajVers=$( echo $latestver | cut -d. -f1 )
url=""
url1="http://airdownload.adobe.com/air/mac/download/${latestver}"
url2="/AdobeAIR.dmg"
#Build URL
url=`echo "${url1}${url2}"`
echo "Latest version of the URL is: $url"
# Compare the two versions, if they are different or Adobe AIR is not present then download and install the new version.
if [ "${currentinstalledver}" != "${latestver}" ]; then
/bin/echo "`date`: Current AIR version: ${currentinstalledver}" >> ${logfile}
/bin/echo "`date`: Available AIR version: ${latestver}" >> ${logfile}
/bin/echo "`date`: Downloading newer version." >> ${logfile}
/usr/bin/curl -s -L -o /tmp/AdobeAIR.dmg ${url}
/bin/echo "`date`: Mounting installer disk image." >> ${logfile}
/usr/bin/hdiutil attach /tmp/AdobeAIR.dmg -nobrowse -quiet
/bin/echo "`date`: Installing..." >> ${logfile}
/Volumes/Adobe AIR/Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer -silent -eulaAccepted
/bin/sleep 10
/bin/echo "`date`: Unmounting installer disk image." >> ${logfile}
/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep Adobe AIR | 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/Utilities/Adobe AIR Application Installer.app/Contents/Info CFBundleShortVersionString`
if [ "${latestver}" = "${newlyinstalledver}" ]; then
/bin/echo "`date`: SUCCESS: Adobe AIR has been updated to version ${newlyinstalledver}" >> ${logfile}
# /Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType hud -title "Adobe AIR Updated" -description "Adobe AIR has been updated." &
else
/bin/echo "`date`: ERROR: Adobe AIR update unsuccessful, version remains at ${currentinstalledver}." >> ${logfile}
/bin/echo "--" >> ${logfile}
exit 1
fi
# If Adobe AIR is up to date already, just log it and exit.
else
/bin/echo "`date`: Adobe AIR 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
Posted on 06-09-2016 12:27 PM
Here's what we're using:
#!/bin/sh
pathToScript=$0
pathToPackage=$1
targetLocation=$2
targetVolume=$3
over500=$( dscl . list /Users UniqueID | awk '$2 > 500 { print $1 }' )
# Set user template
/bin/mkdir -p "$3"/System/Library/User Template/English.lproj/Library/Application Support/Adobe/AIR/ 2>/dev/null
/usr/bin/touch "$3"/System/Library/User Template/English.lproj/Library/Application Support/Adobe/AIR/updateDisabled 2>/dev/null
/usr/bin/touch "$3"/System/Library/User Template/English.lproj/Library/Application Support/Adobe/AIR/eulaAccepted 2>/dev/null
/usr/sbin/chown -R root:wheel "$3"/System/Library/User Template/English.lproj/Library/Application Support/Adobe 2>/dev/null
# Set prefs per user
for u in $over500 ;
do
/bin/mkdir -p "$3"/Users/"$u"/Library/Application Support/Adobe/AIR 2>/dev/null
/usr/bin/touch "$3"/Users/"$u"/Library/Application Support/Adobe/AIR/updateDisabled 2>/dev/null
/usr/bin/touch "$3"/Users/"$u"/Library/Application Support/Adobe/AIR/eulaAccepted 2>/dev/null
/usr/sbin/chown -R "$u" "$3"/Users/"$u"/Library/Application Support/Adobe 2>/dev/null
done
exit 0
Posted on 07-19-2016 03:41 PM
I've noticed this recently which is rather odd:
2016-07-19 17:40:12.785 Adobe AIR Installer[6325:6596178] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2016-07-19 17:40:12.785 Adobe AIR Installer[6325:6596178] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2016-07-19 17:40:12.785 Adobe AIR Installer[6325:6596178] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2016-07-19 17:40:12.786 Adobe AIR Installer[6325:6596178] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
Posted on 09-02-2016 05:46 PM
@emily Adobe AIR 22 is really kicking my a** today.
The usual wrapper and script is failing on 10.10.5 and 10.11.6 VMs.
Didn't get a chance to capture logs, will test again and post here.
I can't believe Adobe still don't have a handle on making a proper Mac deployment PKG.
Don
Posted on 09-02-2016 11:20 PM
For those having problems downloading AdobeAIR.pkg using AutoPkg, are you working behind a proxy server? I had a problem where I was getting errors with hdiutil mounting the .dmg and on inspection the .dmg was empty... The error was something like the .dmg was invalid or something like that... This fixed it for me...
Set the http and https proxies for GitHub via command line, then set the http_proxy and https_proxy variables for bash/ terminal:
Commands to use:
git config --global http.proxy http://[proxyuser:proxypwd@proxy.server.com]:[proxy port]
git config --global https.proxy http://[proxyuser:proxypwd@proxy.server.com]:[proxy port]]
export http_proxy=[proxyuser:proxypwd@proxy.server.com]:[proxy port]
export https_proxy=[proxyuser:proxypwd@proxy.server.com]:[proxy port]
E.g: if you don't need to use a username and password to get through your proxy, the syntax would be...
git config --global http.proxy http://proxy.mydomain.com:3128
export http_proxy=proxy.mydomain.com:3128
...etc.
If you decide at any time to reset this proxy and work without proxy in GitHub, use the following commands:
git config --global --unset http.proxy
git config --global --unset https.proxy
Provided you don't write the http_proxy to your bash profile in terminal, that setting will only respect that current bash session, so exit and quit terminal, then reopen it, or you can run...
export http_proxy=""
export https_proxy=""
...which 'should' reset it.
Now... If you wanted to be really clever, you'd set aliases in terminal for this, so you don't have to type the commands every time you change location, if you use a MacBook on and off-site...
Hope that helps someone!
Posted on 09-03-2016 12:14 PM
Adobe Air dev team must have had a staffing change, since their documented workflow doesn't work.
Snapshot (cringing) shows what files are installed, confirmed working on 10.11.6, 10.10.5, and 10.9.5.
Both on install and update/re-install.
Following up with a postinstall script:
#!/bin/sh
pathToScript=$0
pathToPackage=$1
targetLocation=$2
targetVolume=$3
over500=$( dscl . list /Users UniqueID | awk '$2 > 500 { print $1 }' )
# Set user template
/bin/mkdir -p "$3"/System/Library/User Template/English.lproj/Library/Application Support/Adobe/AIR/ 2>/dev/null
/usr/bin/touch "$3"/System/Library/User Template/English.lproj/Library/Application Support/Adobe/AIR/updateDisabled 2>/dev/null
/usr/bin/touch "$3"/System/Library/User Template/English.lproj/Library/Application Support/Adobe/AIR/eulaAccepted 2>/dev/null
/usr/sbin/chown -R root:wheel "$3"/System/Library/User Template/English.lproj/Library/Application Support/Adobe 2>/dev/null
# Set prefs per user
for u in $over500 ;
do
/bin/mkdir -p "$3"/Users/"$u"/Library/Application Support/Adobe/AIR 2>/dev/null
/usr/bin/touch "$3"/Users/"$u"/Library/Application Support/Adobe/AIR/updateDisabled 2>/dev/null
/usr/bin/touch "$3"/Users/"$u"/Library/Application Support/Adobe/AIR/eulaAccepted 2>/dev/null
/usr/sbin/chown -R "$u" "$3"/Users/"$u"/Library/Application Support/Adobe 2>/dev/null
done
exit 0
Pinged some folks at Adobe to FYI them on the command not working.
Don
Posted on 12-24-2016 03:34 PM
Just gonna put this here...Merry Christmas! :D
Posted on 11-17-2017 02:32 PM
[https://github.com/AllWorkAndNoPlay/jss-scripts/blob/master/acceptAdobeAirTOS.sh](link URL)
Supresses the agreement for Adobe AIR vertion 27.0.0.128 .