[AIR] 打开我的电脑

import flash.filesystem.File;
import flash.desktop.NativeProcess;
import flash.desktop.NativeProcessStartupInfo;
var args:Vector.<String> = new Vector.<String>();
var file:File = new File("C:/Windows/explorer.exe");
args.push("/s,");
var info:NativeProcessStartupInfo = new NativeProcessStartupInfo  ;
info.executable = file;
info.arguments = args;
var nativeProcess:NativeProcess = new NativeProcess();
nativeProcess.start(info);

注意,在app-xml中需要在<application></application>标签中加入

<supportedProfiles>extendedDesktop</supportedProfiles>

 

posted on 2016-12-19 11:05  晏过留痕  阅读(207)  评论(0编辑  收藏  举报