# Deploying Adobe Air and Air Apps

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, chkfile2
3' Constants4
5DQ = chr(34)6Set FSys = CreateObject("Scripting.FileSystemObject")7vbsinstall_folder = "C:\vbs_install\" 'path to store keys in8
9if Not Fsys.FolderExists(vbsinstall_folder) Then10	Fsys.CreateFolder(vbsinstall_folder)11End If12
13' specify installations here14' Install Function takes three params15' First path to exe in quotes16' Second any params to make it silent etc in quotes17' Third file to check against to see if installed (this should include version number) in quotes18
19Install "\\path\to\installer.exe", "/options /to /make /it /silent", "Identifying key"20
21' Install After takes an extra option to make sure that it doesnt install until after something else22
23Install_After "\\path\to\installer.exe", "/options /to /make /it /silent", "Identifying key", "Prereq Key"24
25' Install Function26
27Sub Install(path_to_exe, options, chkfile)28
29	if Not FSys.FileExists(vbsinstall_folder & chkfile) Then30
31		set shell=createobject("wscript.shell")32		shell.run DQ & path_to_exe & DQ & options ,0 ,true33		set shell=nothing34
35		Fsys.CreateTextFile vbsinstall_folder & chkfile36
37	End if38
39End Sub40
41' Install After42
43Sub Install_After(path_to_exe, options, chkfile, prereq)44	if FSys.FileExists(vbsinstall_folder & prereq) Then45		Install path_to_exe, options, chkfile46	End if47End Sub48
49Wscript.QuitLanguage 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).