views:

31

answers:

1

Say I've got a working AIR app that needs to also bundle a driver (licensing okay) for some hardware that the app uses. Anyone know if its possible to launch the driver installer at the end of the app install?

I'm not finding good documentation on this and im wondering if there is a standard pre-install / post-install script I can create to handle stuff like this.

Thanks Stabby

+1  A: 

You should be able to use the NativeProcess API to accomplish this.

Inigoesdr
Okay so I can launch processes, but my question is where to put this code to run when the installer runs - not every time the app runs. Is there a post-install hook somewhere, or a special place I can put NativeProcess code that only runs on the first install?
Well, you have a few options. The easiest would be find a way to check to see if the program is already installed on launch, so it only gets installed when it's not already. For example, write a dummy text file after you finish the installer that you can check for in the AIR app. There is also the encrypted local storage you can use to store a flag that says the installer has already run. (https://www.adobe.com/devnet/air/ajax/articles/encrypted_local_store.html)
Inigoesdr
I see. This is not good - adding a bunch of logic to handle something that should be native to the AIR installer. You said "..after you finish the installer.." - how where you suggesting I run something after the installer?
I originally interpreted your question as "I have a proprietary installer I made", but now that I read it again you didn't really say it like that. That said, you could use something like NSIS(http://nsis.sourceforge.net/Main_Page) to make your own, or wrap one that you are getting from a third party. It might just be easier to make an installer(via NSIS or similar) that runs your driver installer and then runs the .air file.
Inigoesdr

related questions