Deploying Adobe Air and Air Apps

12th February 2014

As much as I hate Adobe Air some deluded companies think its the best way to make software and I’ve been forced on more than one occasion to deploy it to the whole network, which leads nicely into the big problem… There is no MSI and just as annoying software for it are .air files that it wants to install…

Adobe Air does have a silent install option so its deployment can be scripted, my (& my companies) method of deploying silent exes is to use this script:

1dim shell, DQ, MSI_store, vbsinstall_folder, path_to_exe, options, chkfile
3' Constants
5DQ = chr(34)
6Set FSys = CreateObject("Scripting.FileSystemObject")
7vbsinstall_folder = "C:\vbs_install\" 'path to store keys in
9if Not Fsys.FolderExists(vbsinstall_folder) Then
10 Fsys.CreateFolder(vbsinstall_folder)
11End If
13' specify installations here
14' Install Function takes three params
15' First path to exe in quotes
16' Second any params to make it silent etc in quotes
17' Third file to check against to see if installed (this should include version number) in quotes
19Install "\\path\to\installer.exe", "/options /to /make /it /silent", "Identifying key"
21' Install After takes an extra option to make sure that it doesnt install until after something else
23Install_After "\\path\to\installer.exe", "/options /to /make /it /silent", "Identifying key", "Prereq Key"
25' Install Function
27Sub Install(path_to_exe, options, chkfile)
29 if Not FSys.FileExists(vbsinstall_folder & chkfile) Then
31 set shell=createobject("")
32 DQ & path_to_exe & DQ & options ,0 ,true
33 set shell=nothing
35 Fsys.CreateTextFile vbsinstall_folder & chkfile
37 End if
39End Sub
41' Install After
43Sub Install_After(path_to_exe, options, chkfile, prereq)
44 if FSys.FileExists(vbsinstall_folder & prereq) Then
45 Install path_to_exe, options, chkfile
46 End if
47End Sub
Language vb

The script documents what you need to do but the install line for Adobe Air would be:

1Install "\\path\to\installer.exe", "-silent -eulaAccepted", "AdobeAir-X-Y"
Language vb

Subsitute X & Y in the key for the version you are deploying e.g. 4-0. You will need to use this method to update Air in the future, so specifying the version number saves you having to remove the key later. Obviously drop the -eulaAccepted if you can’t accept it for the end user and want them to do it themselves.

Air provides an installer for apps that you can run silently, but you need to run it after Air has installed (In most cases I only depoy air when it is actually needed so its going out at the same time as an app).

Our script has another install function called Install_After that takes a 4th option. This 4th option is a key to check before running the install, the install will then only procede if that key exists. Taking this into account the install line for an Air app would be:

1Install_After "C:\Program Files (x86)\Adobe\Flash\AddIns\airappinstaller\airappinstaller.exe", "-silent \\path\to\air\app\with\no\spaces.air", "App", "AdobeAir-X-Y"
Language vb

This ensures that the installer wont be run before Air is installed and can even be used to make sure that a new version of Air is installed before running.

The installed app will not have a shortcut anywhere so you will need to add them manually using your domain.

Thats about it, our script makes deploying stuff via silent exes quite easy and safe. You can use GPP to delete the key files and have the script automatically re-install the software (unless the exe see the target product and ignores the request).