开发者

jar file with admin privilege

开发者 https://www.devze.com 2023-04-09 17:20 出处:网络
Is there a way in java to execute the jar file with administration privilege, when double click on jar file open with admin privilege ?

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 开发者_如何学Goand click on run this program as an administrator.

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

Thanks.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号