Find a running application to deploy a single clickonce instance?

I am currently facing the problem of only deploying a clickonce application for a single instance, and maybe someone has a good idea about this.

My application is called by a web application that passes parameters to this exe. Now the problem is that if the application is already running, it takes quite a while until a new instance is launched, the parameters are transferred to the executable instance and closed (with opening the URL, checking for updates, ...).

So, is there a way to detect that an executable instance exists without introducing a new small application that does this discovery?

The goal is to reduce the time that the second, third, ... call should get the parameters for the executable instance.

+4
source share
4 answers

When you set up your deployment setup, you can tell VS only that the application is updated every x times (once a day, week, etc.). You can also report this to launch the application and update it in the background. Both of these solutions will solve your problems themselves.

Settings are in the "Projects" settings on the "Publish" tab. Click the "Update" button in the "Installation and Settings Mode" section and set the appropriate parameters.

+1
source

No, this is not a background application. The web application and the Winforms application work with a similar subset of the database. I try not to go into details, because this is not important for the question, but in order to make it more clear: using a web application, users create metadata for our business case and with the Winforms application that make users their specific work.

Thus, using this link, you can create a new set of metadata and cross-check the result in the "working application".

So there are 2 specific scenarios:

  • Winforms-App does not start on the client: when users click the one-click login button or link in a web application, everything should be done as it is now (check with update, ....). So this script works for me.

  • A Winforms application is launched on the client: the executable instance should display the new set of metadata as quickly as possible without checking for a single click check or something else. I try to bypass in this scenario that the "single click starts" dialog box opens, a new instance of the application starts, the new instance passes parameters to the running instance and closes itself. Therefore, I am looking for a solution where I achieve this without creating a new small exe that is known to the web application, which does the job.

+1
source

I think I did not understand what I am trying to achieve.

What I'm trying to do is if there is an instance that can be accessed directly without running the clickonce URL. I am looking for a solution in which I do not need to write a small program (which should also be deployed ...) that checks if the application is working, if so, pass parameters if you do not start the clickonce URL.

Updating the background is not really an option, because this “connect to application” screen still exists and is time consuming, and it is necessary for each user to launch the latest version of the application each time.

0
source

This seems like an interesting use of Click-Once technology. I got the impression that Click-Once is ideal for distributing the client application on multiple endpoint machines in the enterprise.

In the situation described here, this is the background application used by the web server application, which I expect to be installed on only a few servers in the enterprise.

Questions I have:

  • How will your web application pass parameters to the running instance if the web application can detect it? (e.g. remote .NET?)
  • What is your reason for distributing this background application through Click-Once (as opposed to Windows Installer)?

Knowing this can help solve your problem.

0
source

Source: https://habr.com/ru/post/1277434/


All Articles