2 Replies Latest reply on Mar 25, 2012 3:14 PM by SourceSkyBoxer

    How do i create simple Special path like environment variable?

    SourceSkyBoxer Level 1

      Hello, dear peoples,

       

      Question 1:

      How does Adobe Air know with speical folder directory?

      I have beens earched this google. It doesn't find...

       

      Question 2:

      Can Adobe Air find currect Application and apply or copy.same?

      So like Custom effective - i have been found nice Adobe Air with Adobe Effect CS3 / CS4 Plugin

      But i just know - If air app should read currect installed application directory than it can work? Is it possible?

       

      Question 3:

      How do i make my Air app as administratived mode like Adobe Setup after Install-Directory ???

       

      I hope because you understand me sure? Sorry i am deaf. Thanks.. But i am not advanced Englishs peaker Thanks....

        • 1. Re: How do i create simple Special path like environment variable?
          drkstr_1 Level 4

          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.

          1 person found this helpful
          • 2. Re: How do i create simple Special path like environment variable?
            SourceSkyBoxer Level 1

            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:

             

            C:\Users\<Username>\AppData\Roaming"\MyFolderName"

             

            var AppDataPath:File = File.UserDirectory.resolvePath("AppData/Roaming");

            var MyFolderPath:File = AppDataPath.resolvePath("MyFolderName");

            if(MyFolderPath.exists){

            ...

            }else

            ...

            }

            Is it right?

             

            Thanks for Help!

             

            Message was edited by: Jens Eckervogt: Reason: Edit: .....