How do I uninstall AIR Applications Programatically?

This questions comes in from Krunal and he asks about installing / uninstalling an AIR application from another program.

Can I install / uninstall the air application programatically? Suppose i have a X air application and application have a facility to install / uninstall the Y (air application). Is it possible?

If I understand Krunal correctly, he has an AIR application that he installs as part of another larger installer. When he creates an uninstall routine for the larger program, he wants to uninstall the AIR application too.

To do this "Formally" I think you need to sign up for Adobe's the Runtime Distribution program for AIR. I believe once you're in they'll give you access / information on how to do that.

I believe that the program gives you access to install AIR applications and the AIR runtime in invisible mode, but I could be wrong about that.

All that said, I haven't looked specifically into how AIR applications are uninstalled. I suspect that there is just an executable that you can launch from your custom uninstaller.

If Krunal wants to bundle two different AIR applications together using the default AIR installer / uninstaller, I'm unsure how that would work.

That said, I'm hard at work on the Flextras AutocompleteComboBox and have been blogging less. There is now also a Flextras Blog and I have been holding weekly live Q&A / Demo meetings, every Friday at 1pm EST.

I love answering questions, so if you have one, feel free to Ask away! Or stop by one of the Flextras Friday Lunch demos and stump me in real time.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Tink's Gravatar The worst thing about the uninstall process IMO is that it leaves all the assets/databases etc created in 'applicationStorageDirectory' lying around, as its not possible to hook into the uninstall process from within the AIR app to allow you to tidy these things up.
# Posted By Tink | 3/17/09 9:46 AM
Jeffry Houser's Gravatar Tink,

I thought that all uninstallers had similar problems because it is considered inappropriate for an uninstaller to delete items that it did not install / create.

For a non-AIR related example, if I use iTunes to rip a CD into mp3s; I do not want those mp3s to go away just because I uninstall iTunes.

I'm not sure what the appropriate approach to something like this is.
# Posted By Jeffry Houser | 3/17/09 10:36 AM
Tom Chiverton's Gravatar An option in the application's XML descriptor to say to keep (or not) each of the File constants (like File.applicationStorageDirectory) should be easy enough, and the uninstaller can display a message to use saying "this will also delete the contents of X, Y, Z".
# Posted By Tom Chiverton | 3/17/09 11:38 AM
Jeffry Houser's Gravatar Tom,

I'm unclear if you're describing a feature request for AIR Next or explaining how to do it ourselves.

As far as I know, we--as developers--have very little control over the default AIR installer / uninstall routines.
# Posted By Jeffry Houser | 3/17/09 1:11 PM
Tom Chiverton's Gravatar Yeah, that was spectacularly unclear, my bad :-)
It was a feature AIR should have - tidying up after itself.
# Posted By Tom Chiverton | 3/18/09 4:12 AM
All Content Copyright 2005, 2006, 2007, 2008, 2009 Jeffry Houser. May not be reused without permission
BlogCFC was created by Raymond Camden. This blog is running version 5.9.2.002.