Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Runtime getRuntime().exec() in Vista with elevated privileges

843798Jun 30 2008 — edited Jul 7 2008
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 4 2008
Added on Jun 30 2008
7 comments
1,756 views