Communicating with a running process

  • Thread starter Thread starter kirk
  • Start date Start date
K

kirk

Can someone tell me the cleanest way to achieve this -->

I have a running C# tray application. It has a tray menu to let the
user turn on and off things, like monitoring the CPU usage for
example.

Now lets say I have maybe a batch/jscript somewhere and it wants to do
some work and then send a command off to my tray app to tell it "turn
on monitoring", how would I do this? If I were using another EXE(not
a batch/jscript) outside of the tray app, I guess I could used named
pipes, to be clean, any other ideas when not using an EXE?


Thanks.
 
Hi,


Now lets say I have maybe a batch/jscript somewhere and it wants to do
some work and then send a command off to my tray app to tell it "turn
on monitoring", how would I do this? If I were using another EXE(not
a batch/jscript) outside of the tray app, I guess I could used named
pipes, to be clean, any other ideas when not using an EXE?

You could include an EXE as the first step of the batch to send the command
:)
 
Hi,




You could include an EXE as the first step of the batch to send the command
:)

Thanks Ignacio. Thats what I had in mind, just not the "extra" EXE
part.

I think I have a clever idea; I will use named pipes, allow the same
EXE that starts up the tray app to run a second instance if called
again, but only to do named pipes communication with the first
instance, then force the second instance to terminate. I think this
will work?
 
Back
Top