code90
code90

Reputation: 718

How to install an AIR app from within a Flash Projector?

I have two files:

  1. A company demonstration file, created with CS5, flash projector file: demo.exe
  2. A catalog application, created with Flash Builder 4.6, air file: catalog.air

The distribution media is going to be CDROM. demo.exe file will, eventually, be setup as autorun file.

I need to be able to install the air app if not previously installed, or run it directly if already installed from within the "demo.exe" file.

What I tried:

  1. Downloaded air.swf for checking installed air application,
  2. Exported demo.exe as "access local files only"

The Problem:

air.swf returns null for the installed version of catalog.air, so that I can't figure out if catalog.air is installed or not.

The Overcome:

change "access local files only" to "acccess network only" and load air.swf from "http://airdownload.adobe.com/air/browserapi/air.swf" then it will detect the installed version correctly.

But then:

Switching to "access network only" mode will prevent accessing the local catalog.air file. Hence, I can't get access to catalog.air and can't install it.

I am running out of my deadline and pulling my hair. Any hint pointing to right direction is mostly appreciated.


Update: Both flash and air app is using AS3.

Upvotes: 1

Views: 322

Answers (1)

Smolniy
Smolniy

Reputation: 456

If you use AS1/2, try use fscommand ("exec", filename), it may ignore "access network only" restriction.

fscommand ("exec", "catalog.air")

or

fscommand ("exec", "installMyApp.bat") (installMyApp.bat runs catalog.air)

catalog.air/installMyApp.bat must be in fscommand dir near your demo.exe

Upvotes: 1

Related Questions