Skip navigation
Currently Being Moderated

launch executable from within extension

Jun 7, 2012 11:45 AM

hi,

is it possible to launch an executable from within extension, as it is in a regular desktop AIR app?

Where you'd use code like this:

              if(NativeProcess.isSupported)

                {

                    var file:File = File.desktopDirectory;

                    file = file.resolvePath("myOtherExtension.zxp");

                   

                    var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();

                    nativeProcessStartupInfo.executable = file;

                    var process:NativeProcess = new NativeProcess();

                   

                    process.start(nativeProcessStartupInfo);

                   

                }

 

But in a desktop AIR app you'd need to add

<supportedProfiles>extendedDesktop desktop</supportedProfiles>
in the AIR descriptor file, which an extension obviously doesn't have.
thanks,
Jeff.

 

 
Replies
  • Currently Being Moderated
    Jun 7, 2012 11:49 AM   in reply to JeffWinder

    Yes. NativeProcess is supported. No need to specify profiles.

     

    What happens when you try?

     

    Harbs

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 7, 2012 1:59 PM   in reply to JeffWinder

    I just took a better look at your code.

     

    It does not look like you are using NativeProcess correctly. NativeProcess is used to run a command line application (such as Extension Manager). You can not execute a zxp the way you are attempting.

     

    If all you want to do is open the zxp in the default Extension Manager, just do this:

     

    file.openWithDefaultApplication();
    

     

    Harbs

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points