2

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?

2
  • Are you trying to run this from an Air app, in-browser Flash Player, or standalone Flash Player? Commented Jul 8, 2010 at 2:59
  • Hi, Anon, I want to run this from an Air app........ Commented Jul 8, 2010 at 6:49

1 Answer 1

1

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.

echo %systemroot% > systemroot.txt

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)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.