import flash.desktop.NativeProcess;
import flash.desktop.NativeProcessStartupInfo;
if (NativeProcess.isSupported) {
var npsi:NativeProcessStartupInfo = new NativeProcessStartupInfo();
var processpath:File = File.applicationDirectory.resolvePath("MyApplication.whatever");
var process:NativeProcess = new NativeProcess();
npsi.executable = processpath;
process.start(npsi);
}
以上只能運行一個子應用程序,但如何運行一個獨立的應用程序(命令)如ipconfig
並得到結果呢?如何在Windows中運行「ipconfig」並獲取adobe AIR中的輸出?