I have a java program, which will run on windows, which I want to run differently, based on if the program is run with administrative privileges, versus if the program is run as a normal user.
I need a solution that is general, which can work for different flavors of java (not just oracle/sun’s version).
I used the reg query approach to determine if the current program is admin access or not. The following should give enough info that you can modify it for your needs.