Why is AIR NativeProcess not supported?

I am creating a desktop application using Flash Builder, and I need to run the .exe program for it. I downloaded and installed the latest AIR SDK, put it in the sdks folder of Flash Builder and used my project. Now I have no compiler errors, but:

if(NativeProcess.isSupported) { var file:File = new File("C:\Torres.exe"); var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(); nativeProcessStartupInfo.executable = file; var process:NativeProcess = new NativeProcess(); process.start(nativeProcessStartupInfo); } 

I checked and it never goes into the if block. Why not support nativeprocess? Any ideas?

+4
source share
2 answers

Add this

 <supportedProfiles>extendedDesktop</supportedProfiles> 

to the application manifest file. Using NativeProcess requires advanced permissions.

The article is likely to be useful: http://www.adobe.com/devnet/air/flex/articles/air_screenrecording.html

+12
source

Capabilities:

  • AIR Runtime version 2.0 or later. Because NativeProcess only supports version 2.0 and later.

    You can check the version of the Adobe AIR runtime in two ways.
    a) Management
    b) coding

    a) Manual

    • On Windows: Start → Settings → Control Panel → Add or Remove Programs → Select Adobe AIR → Click the "Click here for more information" link
    • On MAC OSx: Window Finder → Select an application → Select Adobe AIR Installer → Right-click → Choose Get Info

    b) By coding

    Paste this code into your desktop application to find the version of AIR execution.

    trace (nativeApplication.runtimeVersion); // 2.6.0.19120

  • Your not mentioned value "extendedDesktop" in the file "supportedProfiles in the application descriptor file, or you do not enable this property.

    <supportedProfiles> extendedDesktop </supportedProfiles>

+1
source

All Articles