I'm building a desktop app using Flash Builder and I need it to run a .exe program. I downloaded and installed the latest AIR SDK, put it in my Flash Builder sdks folder and had my project use it. Now i don't have any 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 just never goes inside the if block. Why wouldn't nativeprocess be supported? Any ideas?
Add this
<supportedProfiles>extendedDesktop</supportedProfiles>
to your app's manifest file. Using NativeProcess requires extended rights.
The article is likely to be helpful: http://www.adobe.com/devnet/air/flex/articles/air_screenrecording.html
Your AIR Runtime not 2.0 or Later version. Because NativeProcess supports in 2.0 and Later version only.
You can check your Adobe AIR runtime version in two ways.
a) Manual
b) By Coding
a) Manual
b) By Coding
Paste this code in your Desktop Application to find the AIR runtime version.
trace(nativeApplication.runtimeVersion); // 2.6.0.19120
Your not mentioned "extendedDesktop" value in the "supportedProfiles" property in the Application Descriptor file or Your not enable that property.
<supportedProfiles>extendedDesktop</supportedProfiles>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With