1 person found this helpful
File.applicationDirectory should point to the install directory. I'm not sure I understand your second question, but you can not write to this directory (well technically it is possible, but is system dependant and not a good practice).
What you can do is create a folder in the documents directory, and write to that instead.
var documentPath:File = File.documentsDirectory.resolvePath("MyFolderName");
As for your last question, I don't believe this is possible, considering that AIR apps are meant to run in user space. Requing admin privileges for something would most likely break portability, so I doubt this would have been implemented as a feature. I could be wrong though.
Thanks @drkstr_1 for answer! But i want know like runasadmin or service call run-as-admin like Adobe Setup. I am trying and i can not find i know File and FileStream right.
Edit: But File.ApplicationDirectory - if air is running in administrative mode than it will write this.. Just i know because Adobe Setup Air Application can call a nice service for calling into run-as-admin....
How do i know? If my air app want create or exist currect directory like Example:
var AppDataPath:File = File.UserDirectory.resolvePath("AppData/Roaming");
var MyFolderPath:File = AppDataPath.resolvePath("MyFolderName");
Is it right?
Thanks for Help!
Message was edited by: Jens Eckervogt: Reason: Edit: .....