In AIR 2 you can build an EXE installer file for distributing an AIR application on Windows. I was getting a good few errors at the start trying this (it was a bit of a pain really), so to ease your experience of AIR to EXE, here are the steps I took to complete the process (btw, its just a fluke it worked out to 10 steps, only numbered it retrospectively!).
UPDATE: Serje Jespers created a drag-n-drop tool to accomplish this task, have a look here
I have a follow-up post also, to show how to package the AIR application EXE file, with the AIR runtime .EXE as a single setup file using InstallJammer! – link
Any Questions? Just drop a comment
Firslty, some of the command prompt error messages I was seeing.
- -storetype is required
- unable to create temp file in output directory
- Java not a recognised command
1. Update your Air SDK from Air 1.x to Air 2 Beta 2(its in Beta 2 at the time of writing, but at least Air 2.0 is needed), and also install the Air 2.0 runtime.
2. Once downloaded, look up follow the steps carefully in How to overlay the Adobe AIR SDK for use with the Flex SDK.
3. In the app.xml file (or whatever your .xml app file is called) in the Flex Builder project, you have to add the following line:
<supportedProfiles>extendedDesktop desktop</supportedProfiles>
4. After installing Air 2 Beta 2 SDK & runtime, some old programs may not run, or you might get the Debug error:
Descriptor version does not match runtime version.
Solution: in you projects app.xml file make sure your application descriptor is updated to:
<application xmlns="http://ns.adobe.com/air/application/2.0beta2">
(as opposed to …/application/2.0 or …/application/1.5)
Note: If you look in the SDKs readme in the bin folder (theres really no need to though), you will see that the template option for the latest Air SDK is
“Descriptor.2.0beta2.xsd – An XML Schema Definition file for the AIR 2.0beta2 application descriptor file.”
5. Run your application now to test that all these changes have taken (it should run ok at this point).
Note: Points 1-4 above are covered very nicely in Rich Tretola’s Everything Flex blog, but has less emphasis on errors/problems encountered.
The following steps will show you how to set up the environment to run the ADT commands and export you AIR app as an EXE.
6. Set you environment variables:
You will need the Java JDK; if you dont have it, get it here. Im assuming you already have Flex Builder 3 and AIR SDK installed at this point.
Add JDK and ADT (Adobe Development Tools) to the Environment Variables ‘Path’.
Open Start/Control Panel/System/Advanced System Settings/Environment Variables
Click on Path, then Edit. Add your ADT and JDK ‘bin’ install paths to the end of the other text.
e.g. C:\Program Files (x86)\Adobe\Flex Builder 3\sdks\3.2.0 (Adobe Air 2.0)\bin;C:\Program Files (x86)\Java\jdk1.6.0_18\bin
Note: if you change the SDK version, make sure to update the env. var. Path with the new Adobe SDK bin folder (this casued me 1 hour of grief)
7. Test that these work.
Open the Command Prompt window (or reopen to make sure changes have taken effect). Type javac to test the java path, and also adt to test the Adobe path. A list of usage options should appear for both.
Note: more on setting up the Air SDK and ADT environment variable in the Technology Documents blog.
8. Flex Builder 3 – Export Project
- Click on Project in the Menu Bar, then Export Release Build.
- Choose a location for the .air file to be exported to and hit next.
- Create a new digital certificate, but do not store it in the Flex project folder, store it someplace else (I think you need this certificate file if you ever want to update the .air file, so keep it safe).
9. Run the ADT command:
Open the Command Prompt window and type the following.
adt -package -target native c:\AirExe\myApp.exe c:\AirExe\myAirApp.air
The myApp.exe is the EXE file you wish to create, and the myAirApp.air is the file you exported in Step 8.
More on the ADT commands at Adobe Help
10. Run the exe.
Run the generated exe file to install via a native Windows installer (this exe can also be packaged with other windows setup i.e. c#)
Air application and Air Runtime in a single setup.exe
I will be writing a tutorial shortly to show how to package an Air app along with the Air runtime in a single .exe using InstallJammer.
I have written a tutorial to show how to package an Air app along with the Air runtime in a single .exe using InstallJammer.
Tags: Air, C#, Exe, executable, Flex, native, packaging, storetype, Windows

March 10, 2010 at 11:36 am |
” Air runtime in a single .exe using InstallJammer”
i am expecting this,
is it possible to do the same using adt command
March 10, 2010 at 2:06 pm |
Hi
As far as I can see you need the third party software like InstallJammer, as you have to package both myAirApp.exe and airDistributable.exe inside a setup.exe. Dont think this can be done with ADT alone.
I should have a tutorial posted soon (maybe tonight)
March 10, 2010 at 10:51 pm |
Tutorial: Air runtime and Air app in a single .exe using InstallJammer now up on the blog:
http://bishoponvsto.wordpress.com/2010/03/10/deploying-air-application-with-air-runtimeredistributable-in-single-exe/
March 10, 2010 at 10:29 pm |
[...] This is a follow-up from an article I wrote on packaging and AIR application as an EXE. [...]
March 12, 2010 at 5:37 pm |
THANKS!!!!
You saved me, this is exactly what I needed!!!
March 17, 2010 at 6:26 pm |
[...] Topics: Creating an AIR application using the command line tools Interacting with a native process Adobe Air to Exe – Packaging Air app in Windows executable Packaging an AIR application in a native installer Your First AIR 2.0 EXE file Adobe Flex & [...]
March 22, 2010 at 7:20 pm |
Good article. Up to this point I had not understood the role of the ADT program in creating an installable executable, nor where to find ADT.BAT.
March 23, 2010 at 5:51 am |
When I run the adt command like this
adt -package -target native (path to where the exe file is to go) (path to the air file created ) it tells me
“Signing options required to package from descriptor and fileset”
If I then include -storetype pkcs12 -keystore certificate.p12 (where certificateis the path to my self signed cert) it the asks for a password but doesn’t allow me to put it in.
To say I am confused is an understatement
March 24, 2010 at 3:58 pm |
I have’nt come accross that error before. Do you have different Flex SDK versions installed (check in C:\Program Files (x86)\Adobe\Flex Builder 3\sdks…). This was causing errors for me. Make sure the correct bin\adt in your PATH, and that FlexBuilder (if you use it) is compiling using the same SDK version.
March 24, 2010 at 8:41 pm |
Thanks for that. My problem was spaces in the command prompt. Great tutorial by the way
March 24, 2010 at 9:54 pm |
Can I just add (for those who have a similar problem) that apart from removing spaces in the command line,I did need to add signing options so my command line looked like
adt -package -target native -storetype pkcs12 -keystore C:\Users\David\test_cert.p12 C:\Users\David\mytest.exe C:\Users\David\test.air
When I ran this, the command prompt then asked for the certificate password but when you type in the password it doesn’t display and it looks like nothing has happened, but it has! I then navigated to where mytest.exe was supposed to be and it takes a few seconds for the file to write and display in the directory so be patient.
April 13, 2010 at 10:08 am |
can you tell me what the password is …. i reached the same position where it asked me for the password. what should i enter as the password./??
April 13, 2010 at 10:13 am |
C:\Users\David\test_cert.p12
what is this all about .. can you please explain. ????
March 26, 2010 at 2:38 am |
Worked like a charm. Thanks for the post.
April 15, 2010 at 9:09 pm |
Great article with steps detailed. Thank you; you saved me a couple of hours of frustration.
On the signing thing; I created and used the certificate in Flash Builder (when you do the “Export Release Build”) and created the air file. I used this air file with adt; I did not get the message “certificate message” from adt. Note: You can create a certificate from flash builder (during “Export Release Build” process) and give the password for it.
April 23, 2010 at 12:23 am |
Just out of interest. What was the reason you folk had to convert the AIR file to an EXE?
In my case it was to be packaged in an EXE that included a C#.Net application.
April 29, 2010 at 7:52 pm |
What do you think how can i solve my problem it’s same as this here.
When i try to install my packed app. it shows me this error.
“This application requires an update to Adobe AIR that is not available for your system.
Please view the system requirements for Adobe AIR and update your system accordingly.”
Any suggestion.?!
April 29, 2010 at 9:50 pm |
I think this might be a problem with Air 1.5… Which one are you using, maybe try the Air 2 beta download just to narrow down the problem. Are you using Linux?
April 29, 2010 at 8:33 pm |
Thanks for the steps! Going to try this later today and this should prove very helpful.
June 9, 2010 at 7:45 am |
No working for me
I tried every step but no help,
I even downloded latest Adobe AIR 2 Release Candidate rc1 and changed the app descriptor to but still no help
every time i run adt command i’m getting “-storetype is required” error
i’m using flash cs4
Pls help!! i want to create exe file of my .air urgently
thnx
June 10, 2010 at 4:31 am |
Hi i am facing a problem when I’m issuing a command like this
D:\temp>adt -package -storetype pkcs12 -keystore d:\hvm\henrymempin.p12 -target native d:\temp\librarysystem.exe librarysystem.air
the error appear like this
no such file d:\temp\librarysystem.exe
what do i need to do, please help me?
July 8, 2010 at 2:33 pm |
Well
You may need to specify the director for you librarysystem.air file like in the following:
adt -package -target native c:\AirExe\myApp.exe c:\AirExe\myAirApp.air
August 9, 2010 at 10:12 am |
I experienced some issue while working with native application (exe) instead of air. I cannot update the application via auto updater. Do you have any idea, how to resolve this issue? Let me know please.
August 9, 2010 at 10:32 am |
I think these guys were having the same issue. Have a look and see if their discussion is of any help:
http://www.kleptomac.com/auto-update-for-adobe-air-executable-exe.htm
August 9, 2010 at 12:09 pm
Thank you very much for you immediate response. I am going to have a look on to this site. Thanks again
August 11, 2010 at 11:52 pm |
Has anyone been able to package their air app to a native installer via an ANT task? I have this working from the terminal going through Java seems to be throwing me all sorts of errors: http://forums.adobe.com/thread/698635
October 20, 2010 at 11:35 am |
Works perfect
Thanks
Abhi
December 19, 2010 at 12:09 am |
Hi, i take this mistake:
Descriptor is invalid for native install. The namespace must be at least 2.0 and the app must support the profile extendedDesktop.
I make my project with flex builder 3
I update AIR & Java SDKs..
Especcially, i download the Air Sdk 2.x and put it into the folder Flex Builder 3\sdks\3.0.0
With this version of Air SDK i cannot export my application from with flex builder..
I suspect that something i must change in this line of xml:
but i don’t know what version i have…
Any help?
December 19, 2010 at 12:17 am |
**
**//THE LINE OF XML //**
December 20, 2010 at 10:52 am |
Does this have something to do with Point 4 above?
January 20, 2011 at 9:37 am |
I am getting error while doing Export Release build.
I am using versions as this
Air -> 2.5
Java -> 1.6
Flex Builder -> 3.5
When i am trying to create .air file , It is throwing error window like this
“Error creating Air file:306:ERROR, desktop, mobileDevice, extendedMobileDevice, tv”.
September 29, 2011 at 1:48 pm |
Thanks a lot!! And the performance’s much better than things like swfkitpro
Iced
November 22, 2011 at 11:27 pm |
air tool…
[...]Adobe Air to Exe – Packaging Air app in Windows executable « Bishop On Development[...]…
July 2, 2012 at 2:41 pm |
When i am trying to create .air file , It is throwing error window like this
“Error creating Air file:306:ERROR, desktop, mobileDevice, extendedMobileDevice, tv”.
December 13, 2012 at 11:08 am |
This paragraph gives clear idea in favor of the new people
of blogging, that really how to do blogging and site-building.