Find running clickonce deployed single instance app


I'm currently facing a problem with my single instance clickonce deployed app, and maybe someone has a good idea about it.

My app is called by a web application, which passes parameters to this exe. Now the problem is, if the application is already running, it takes quite a long time, until the new instance is started, the parameters are handed over to the running instance, and closed (with opening the URL, checking for updates,…).

So is there a way to detect that there is a running instance, without introducing a new small app, which does this detection?

The goal is to decrease the time, which the second, third, … call needs to get the parameters to the running instance.

Best Solution

When you setup the deployment setting, you can tell VS to only let the application update every x amount of time (once a day, week, etc). You can also tell it to launch the application and update in the background. Both these would solve your problems on their own I think.

The settings are in the Projects settings, on the Publish tab. Click the "Update" button in the "Install mode and settings" section and set appropriate settings.

Related Question