In this example I will show you how to silently install Salesforce Chatter 3.2.1. You will first need to download AIR Redistribution Helper (ARH) here. The AIR Redistribution Helper (ARH) utility is a small executable that you can use as part of a custom installer.
To install an application:
arh -installAppSilent {( -location <loc> ) -desktopShortcut -programMenu } <file>
-location — the install location.
-desktopShortcut — if present a desktop shortcut icon is added.
-programMenu — if present, an entry is added to the program menu (Windows only).
file — the AIR file to be installed.
Example on how to install Salesforce Chatter with the default install location:
arh -installAppSilent -desktopShortcut -programMenu desktop_air25.air
You will then need to update the current user’s runtime state with the following command:
arh -updateUserState
This updates the current user’s registry and configuration settings to reflect the fact that the application has been installed for that user. This command must be run from a non-elevated process (in other words, using the user’s account, not a separate administrator account).
If the updateUserState command is not performed, the AIR in-browser will not be able to detect the AIR application.
To uninstall an application:
arh -uninstallAppSilent <appid> <pubid>
appid — the application identifier specified in the application descriptor.
pubid — Required if and only if the application specifies a publisher ID. Publisher IDs are deprecated as of AIR 1.5.3. Only applications created prior to AIR 1.5.3 should use a publisher ID.
Example on how to uninstall Salesforce Chatter:
arh -uninstallAppSilent sfdc-desktop 0E7F0072024938CDBA99B20C38B5F315254C2A5B.1
Remember that the appid and pubid is specifically for this version of Salesforce
Other commands that you can use with ARH
The AIR Redistribution Helper (ARH) utility is a small executable that you can use as part of a custom installer.
To check whether the runtime is installed:
arh -isRuntimeInstalled
ARH exits with code 0 if the runtime is installed. It exits with code 1 if the runtime is not installed.
To get the installed AIR version number:
arh -runtimeVersion
To query the state of an installed application:
arh -isAppInstalled <appid> <pubid>
appid — the application identifier specified in the application descriptor.
pubid — the publisher ID, if used by the application.
To locate an installed application:
arh -appLocation <appid> <pubid>
To obtain an installed application’s version (as a string):
arh -appVersion <appid> <pubid>
appid — the application identifier specified in the application descriptor.
pubid — the publisher ID, if used by the application.