Adobe Air

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

Silent installer for Adobe AIR.


Adobe AIR is available from Adobe, but you will need to apply for a free license to distribute it legally.

Adobe AIR 3

The -eulaAccepted switch is optional, but prevents the user from having to accept Adobe's EULA when starting AIR for the first time.

<package id="adobeair"
  name="Adobe AIR"

  <variable name="version" value="" />

  <check type="uninstall" condition="versionequalto" path="Adobe AIR" value="%version%" />

  <install cmd='%SOFTWARE%\adobeair\AdobeAIRInstaller.exe -silent -eulaAccepted' />

  <upgrade cmd='%SOFTWARE%\adobeair\AdobeAIRInstaller.exe -uninstall' />
  <upgrade cmd='%SOFTWARE%\adobeair\AdobeAIRInstaller.exe -silent -eulaAccepted' />

  <remove cmd='%SOFTWARE%\adobeair\AdobeAIRInstaller.exe -uninstall' />


Disable Automatic Update

Adobe AIR automatically checks for updates and prompts the user to install them, which needs Administrator privileges.

You can use the AIR SettingsManager to change that on a per-user basis or disable this behaviour globally for all users by adding a DWORD value named UpdateDisabled to the HKLM\Software\Policies\Adobe\AIR registry key, and setting this value to 1 (According to Adobe AIR Administrator's Guide).

This can also be done through WPKG:

  <install cmd='REG ADD "HKLM\SOFTWARE\Policies\Adobe\AIR" /v UpdateDisabled /d 1 /f /t REG_DWORD' />

  <upgrade cmd='REG ADD "HKLM\SOFTWARE\Policies\Adobe\AIR" /v UpdateDisabled /d 1 /f /t REG_DWORD' />

Disable EULA Acceptance

Just make 2 text files under the %AppData%\Adobe\AIR

Dim objFSO, objFile

Set objFSO = CreateObject("Scripting.FileSystemObject")

If Not (objFSO.FolderExists(Session.Property("AppDataFolder") & "\Adobe")) Then objFSO.CreateFolder Session.Property("AppDataFolder") & "\Adobe"

If Not (objFSO.FolderExists(Session.Property("AppDataFolder") & "\Adobe\AIR")) Then objFSO.CreateFolder Session.Property("AppDataFolder") & "\Adobe\AIR"

If (objFSO.FolderExists(Session.Property("AppDataFolder") & "\Adobe\AIR")) Then

Set objFile = objFSO.CreateTextFile(Session.Property("AppDataFolder") & "\Adobe\AIR\UpdateDisabled", True) : objFile.Close

Set objFile = objFSO.CreateTextFile(Session.Property("AppDataFolder") & "\Adobe\AIR\eulaAccepted", True) : objFile.WriteLine("2") : objFile.Close

End If

Set objFSO = Nothing

Deploy Adobe AIR Applications

See this blog entry from Adobe to get a few hints on how to deploy Adobe AIR applications through WPKG.

Basically you can just run Adobe AIR Installer.exe -silent <Application>.air or add the following switches:

required to run without user interaction during installation
adds a desktop shortcut for the AIR application
adds a Start Menu shortcut for the AIR application

According to Adobe Help the silent switches are as follows:

-silent {-eulaAccepted -pingbackAllowed ( -location <loc> ) -desktopShortcut -programMenu} path

You cannot use the silent installer option to update an installed AIR application. So you have to uninstall before upgrade.

Uninstall is possible using msiexec /x {...} from Uninstall string.

Exit codes

Exit code Description

0 Successful install

1 Successful, but restart required for completion

2 Usage error (incorrect arguments)

3 Runtime not found

4 Loading runtime failed

5 Unknown error

6 Installation canceled

7 Installation failed

8 Installation failed; update already in progress

9 Installation failed; application already installed


    <package id="MyTimer"
             name="My Timer Adobe AIR application"

        <variable name="PKG_VERSION"          value="0.1.0" />
        <variable name="PKG_SOURCE"           value="%SOFTWARE%\packages\AdobeAir" />

        <check type="uninstall" condition="valuegreaterorequal" path="MyTimer" value="%PKG_VERSION%" />

        <depends package-id="AdobeAir" />

        <install cmd='%COMSPEC% /c if exist %PKG_SOURCE%\MyTimer.air  %PKG_SOURCE%\AdobeAIRInstaller.exe -silent -desktopShortcut -programMenu %PKG_SOURCE%\MYTimer.air' />

        <upgrade include="install" />
        <downgrade include="install" />

        <remove cmd="msiexec /qn /l* c:\netinst\logs\mytimer.log /x{796F2B0E-FB6D-B7AB-416B-xxxxxxxxxxxx}" >
                <exit code="1605" />