I want run “%systemroot%\System32\reg.exe” this file to do something, but when I use “new File(“%systemroot%\System32\reg.exe”);” the ActionScript cannot find file, so anyone can help me find this?
I want run %systemroot%\System32\reg.exe this file to do something, but when I use new
Share
Well, since AIR is multi-platform and %systemroot% works only on Windows, it’s not possible.
But you can make a *.bat that installs with your application.
So, you have to execute that *.bat file one time, when you install the application.
Then, you just open the systemroot.txt, read the first line, and you have what you asked for.
I hope it helps.
(Maybe not for you because this thread is so old, but for anyone that ends here searching a solution)