Ylianst / MeshCentralAssistant

Tray icon tool for the MeshCentral Agent. It displays the state of the agent, you can start and stop the agent and request help.
https://meshcentral.com
Apache License 2.0
36 stars 26 forks source link

Launch Assistant for multiple calls #36

Open elmar69 opened 10 months ago

elmar69 commented 10 months ago

I'm going to send help request directly from (Windows-)application. With Parameters -visible -connect -help:"test" it does work on first invocation. But, on further invocations, no further request is sent until the user does explicitly close Assistant.

How can that be solved?

buckybytes commented 5 months ago

I wonder if that means the second invocation terminates itself when it discovers the first still running, and before the help message is sent. I think changing that default behaviour would introduce other issues that would be outside my abilities to solve, or even reliably detect and test against.

If I was you, I'd probably just set the application that runs the command to kill the existing process before invoking one with a help parameter. I'm not sure how that would work in your scenario, but if you haven't figured it out yet, maybe this is a clue.

elmar69 commented 5 months ago

The second terminates as there is only a single process visible in task-manger.

I did add code to my application to terminate process created before on a second call.

It would be a good idea to have the behavior documented with the description of command line arguments.

An optimal solution would be to communicate to the first instance to make it send the request before terminating.

buckybytes commented 5 months ago

PR #41 makes requested addition to documentation.