Adobe Air Install

musat
Contributor III

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

27 REPLIES 27

pblake
Contributor III

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

musat
Contributor III

Thanks, that looks great. Wonder why that didn't show up in my searching. Guess "Adobe" and "Air" are a bit too common.

gregneagle
Valued Contributor

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.

musat
Contributor III

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.

RobertHammen
Valued Contributor II

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...

chris_kemp
Contributor III

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?

joe_farage
New Contributor III

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

pearlin
New Contributor III

Thanks @joe.farage! This script is AWESOME!

junderwood
New Contributor III

@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?

laxthxdude
New Contributor II

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.

junderwood
New Contributor III

@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.

Marcel_75
New Contributor

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).

burkeyc
New Contributor

@joe.farage

Whenever we attempt to run this .sh we get this error, I'm sure where to start looking to resolve this issue. a89af511b8fa4ee79fbe67128466755e

Any assistance would be awesome. Thanks!

millersc
Valued Contributor

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.

Aziz
Valued Contributor

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"

burkeyc
New Contributor

This is the error that now occurs after making the change that @millersc suggested. 64a0adf25f804cad9579b14f13d4a0c0

millersc
Valued Contributor

How are you editing the script? looks like bad character. Could try putting that line in " " and remove the back slashes.

lee_evans
New Contributor

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

Ongelmanratkoja
New Contributor

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.

emily
Valued Contributor III
Valued Contributor III

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

donmontalvo
Esteemed Contributor III

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
--
https://donmontalvo.com

emily
Valued Contributor III
Valued Contributor III

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

donmontalvo
Esteemed Contributor III

@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

--
https://donmontalvo.com

sickboi78
New Contributor

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!

donmontalvo
Esteemed Contributor III

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.

d38a707066fd491b804838657d4e7ad5

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

--
https://donmontalvo.com

donmontalvo
Esteemed Contributor III

Just gonna put this here...Merry Christmas! :D

806a85688358436c87ca7afe2c8e914e

--
https://donmontalvo.com

tcam
Contributor

[https://github.com/AllWorkAndNoPlay/jss-scripts/blob/master/acceptAdobeAirTOS.sh](link URL)

Supresses the agreement for Adobe AIR vertion 27.0.0.128 .