Am using nsis for launching my java application. I wanted to show a window once the application is launched. I can pass a command line argument while launching the java application like this.
OutFile "Test.exe"
....
ExecWait javaw.exe -jar myapp.jar
SectionEnd
Now I would like to show the default window of the already running java application if another instance of the nsis launcher is invoked. In order to do this I need to pass an argument to my java application. For this to happen I have to pass the argument to the cmd window(internally used by NSIS) of the already running instance.
How would I accomplish this?
I’m not sure I understand you correctly but you can use this example to create a mutex for the nsis installer. The example there will bring to front the already running installer, you can change it a bit to bring to front the running java window, if you know its handle or title.
If you have Spy++ (which comes with Microsoft Visual Studio) you can find the window class of your java app.