Java Runtime getRuntime().exec() in Vista with elevated privileges
843798Jun 30 2008 — edited Jul 7 2008Hi,
I am currently trying to run a command with getRuntime().exec() but I need to get elevated privileges. It's a small program that does some changes to the registry, written in C, and I need it to run before my Java code is executed. I get a message about needing elevated privileges to run this command.
I know that normally, I would need to run my command prompt with administrator rights (Run as Administrator). Is there a way to do the same through a command with getRuntime().exec() or simply to elevate its privileges without having to run the whole java program as admin?
Thanks a lot!
Fr4nck