I'm going to develop a java web start application, which need to access protected system directory and install a program there.
I know, how to exit sandbox, my application is signed and have access to filesystem. The problem is, that it sill can't access directories like C:/windows/system32.
I found solutions for standalone java applications: Java: run as administrator
How to do this in java web start?
Thanks in advance for answer!
In your case you can probably try to use the following trick:
Precompile a jar file with the Manifest pointing to the main class, that carries out all of the required filesystem routines
Put this jar somewhere into the resources folder of your Web-Start application and then copy it into the user's Temp folder upon Web-Start execution
Provision required files from the elevation PowerToys in the similar manner
Call " %PATH_TO_USER_TEMP%/elevate" command together with "java -jar %PATH_TO_USER_TEMP%/yourJar.jar" (please refer to the article above or additional documentation on the Elevation PowerToys to find out the details)
If everything works out, user shall be presented with a request to grant the executed java process required Admin privileges.