views:

254

answers:

1

Hi:

Using Adobe Air 2.0 beta 2 I want to 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?

A: 

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.

James Ward
Thanks you so much for your time, the information was very helpfull.
Edward