Adobe Air - Install Lastest Always

GaToRAiD
Contributor II

Hello all,

I've seen some variations of this script on here floating around, but not one that does it all for you via a script without a package. I adapted it from a script I found for Adobe Flash Latest Install.

#!/bin/sh

# This script downloads and installs the latest Adobe Air for compatible Macs

# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')

# Specify the complete address of the Adobe Air disk image

fileURL="http://airdownload.adobe.com/air/mac/download/latest/AdobeAIR.dmg"

# Specify name of downloaded disk image

air_dmg="/tmp/.dmg"

if [[ ${osvers} -lt 6 ]]; then
  echo "Adobe Air is not available for Mac OS X 10.5.8 or below."
fi

if [[ ${osvers} -ge 6 ]]; then

    # Download the latest Adobe Air software disk image

    /usr/bin/curl --output "$air_dmg" "$fileURL"

    # Specify a /tmp/air.XXXX mountpoint for the disk image

    TMPMOUNT=`/usr/bin/mktemp -d /tmp/air.XXXX`

    # Mount the latest Adobe Air disk image to /tmp/air.XXXX mountpoint

    hdiutil attach "$air_dmg" -mountpoint "$TMPMOUNT" -nobrowse -noverify -noautoopen

    # Install Adobe Air from the installer package stored inside the disk image

    /$TMPMOUNT/Adobe Air Installer.app/Contents/MacOS/Adobe Air Installer -silent -eulaAccepted

    # Clean-up

    # Unmount the Flash Player disk image from /tmp/air.XXXX

    /usr/bin/hdiutil detach "$TMPMOUNT"

    # Remove the /tmp/air.XXXX mountpoint

    /bin/rm -rf "$TMPMOUNT"

    # Remove the downloaded disk image

    /bin/rm -rf "$air_dmg"
fi

exit 0

Hope you enjoy it!

3 REPLIES 3

calumhunter
Valued Contributor

Nice have you seen AutoPKG?

You oughta check out AutoPKG
https://www.youtube.com/watch?v=mqK-MAEZekI&list=UUiRYn1OSRv2bvU3enNwoZxg

sk8559
New Contributor III

@GaToRAiD i am facing below issue with this script LINK i tried with couple of download URL but still same issue. Please help

Script result: Latest Version is: 32.0
Current installed version is: 30.0
Latest version of the URL is: https://airdownload.adobe.com/air/mac/download/32.0/AdobeAIR.dmg
Updating to 32.0.0.125
done
grep: AIR: No such file or directory
2020-08-27 07:57:05.150 defaults[17153:534400] The domain/default pair of (/Applications/Utilities/Adobe, AIR) does not exist
Error running script: return code was 1.
Running Recon...
Retrieving inventory preferences from ----------JAMFCloud
Locating accounts...
Locating package receipts...
Searching path: /System/Applications
Locating software updates...
Locating plugins...
Locating printers...
Searching path: /Applications
Locating hardware information (Mac OS X 10.15.6)...
Gathering application usage information...

sk8559
New Contributor III

Also i tried your script and see below

Executing Policy Adobe Air - Update
Running script Acrobat Air Update-Install...
Script exit code: 0
Script result: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
hdiutil: attach failed - image not recognized
/Library/Application Support/JAMF/tmp/Acrobat Air Update-Install: line 36: //tmp/air.Dl8E/Adobe Air Installer.app/Contents/MacOS/Adobe Air Installer: No such file or directory
hdiutil: detach failed - No such file or directory