Context: All I want to do is, start a GUI application (ex: mspaint) on Windows node (spawned on cloud) using Java and when I connect using RDP, I want the GUI application to be already there.
Issue: After connecting to the remote Windows node through RDP, I don't see the GUI application already there. I can see that my Java program has actually started GUI application and I can see that in the tasks list. It got started under "Services" session. When I run the same Java program after connecting to RDP, it started the same application in session with name "RDP-Tcp#0"
If I am using traditional RDP client, I can simply choose the session I want to connect to but here I have no control as I am using HTML5 RDP client called Guacamole.
Java program uses Runtime.getRuntime().exec() API to run a powershell script thats starts the GUI application.
Is there a way to run my script so that it runs and shows the GUI on a different session? This is trivial in Linux where we need to simply export the DISPLAY env variable.
Please help