4 Replies Latest reply on Mar 4, 2011 2:26 AM by macromedical

    file for native process execution using environment variables




      I'm using the native process api in my air  program. Since this does not support the starting of batch files  directly, i have to start the cmd.exe instead and inside this, my batch  file. This works so far, but I have to use the absolut path  "c:\windows\system32\cmd.exe", which is not a good solution. Now I tried  to instantiate a new file object using one of the windows environmental  variables like "SystemRoot" or "windir", but i get the error "Error  #2004: One of the parameters is invalid. My code looks like this...


      var f: File = new File("%SystemRoot%");


      I tried some variations, but was not able to get this working. Is there any way to do this=