PC Review


Reply
Thread Tools Rate Thread

Communicating with a running process

 
 
kirk
Guest
Posts: n/a
 
      18th Apr 2007
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.

 
Reply With Quote
 
 
 
 
Ignacio Machin \( .NET/ C# MVP \)
Guest
Posts: n/a
 
      18th Apr 2007
Hi,


"kirk" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> 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



 
Reply With Quote
 
kirk
Guest
Posts: n/a
 
      18th Apr 2007
On Apr 18, 2:43 pm, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions.com> wrote:
> Hi,
>
> "kirk" <kir...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
>
> > 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
>


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?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Communicating with process mick Microsoft Dot NET Compact Framework 1 28th Jun 2006 04:07 PM
System.Diagnostics.Process.Start problem when the process is already running Bob Trabucco Microsoft Dot NET Framework 3 25th May 2005 02:38 PM
Windows 2000 hangs when running dos based time and attendance programme when communicating through COM port plastic_man Microsoft Windows 2000 Security 3 15th Mar 2004 10:55 AM
Windows 2000 hangs when running dos based time and attendance programme when communicating through COM port plastic_man Microsoft Windows 2000 File System 3 15th Mar 2004 10:55 AM
What is Running/Communicating in the Background? Roger Windows XP Security 0 12th Nov 2003 02:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:48 PM.