1

Is there a way in java to execute the jar file with administration privilege, when double click on jar file open with admin privilege ?

i know this way: go to C:\Program Files\Java\jre6\bin and right click on javaw.exe file choose compatibility and click on run this program as an administrator.

but this way isn't an appropriate for normal application users >>>

Thanks.

XR00T
  • 11
  • 5
  • This might help http://stackoverflow.com/questions/1385866/java-run-as-administrator – Mob Oct 02 '11 at 02:31

1 Answers1

1

You could call the JRE from an executable and add an administrator manifest.

Bat To Exe Converter works nice for such workarounds.

It will allow you to write a batch file and convert it into an self-extracting executable that contains your .jar file.

Dennis
  • 14,264
  • 2
  • 48
  • 57