开发者

Flex 3.5 and Air 2.0 beta 2: Opening a *.cmd file

Using Adobe Air 2.0 beta 2 I want to开发者_Go百科 open a cmd file when the user clicks on a button, but I get "Error #3001: File or directory access denied".

the code:

<mx:Button width="200" height="50" click="OpenFileHandler()"/>

<mx:Script>

private function OpenFileHandler():void
{
   var file:File = new File("C:\\OpenIE.cmd");
   file.openWithDefaultApplication();
}

The directory it's accessible and the file exist. Does adobe Air 2.0 beta 2 have a restriction when opening a cmd file?


There are limitations on what can be opened with openWithDefaultApplication in a typical AIR 2 application. Refer to the asdoc for the complete list. If you use a native installer for the application then the limitations do not exist and you can also use the NativeProcess API.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜