My Java program uses the Windows Registry to store some values. (and yes, this cannot be done differently)
The problem is that I implemented a Drag and Drop Feature, but Windows does not allow drag and drop if a process is elevated, and the drag source is not.
Like dragging a folder from the Windows Explorer to the Program.
Now my Question is, is it possible to partially elevate my program, or use a subprogram that is elevated, and passes the values to the main program somehow?
And yes, I know that the explorer can be elevated as well, but no user has this by default.
Used solution:
Main Application is launched, creates a ServerSocket, then starts the Helper Application, which is wrapped in an .exe, which requests Admin privileges on start.
Meanwhile, the main app waits for the Helper to connect via a Socket, the Helper than sends all read values from the registry via an ObjectOutputStream.
The Helper application stay in while(true) and waits for further instructions from the main app, if the main app is shutdown, it will send an "exit" command to the Helper, the helper will then shutdown.