Board index » Visual Studio » A Program To Check The Activities Of Another Program
|
Xam
|
|
Xam
|
A Program To Check The Activities Of Another Program
Visual Studio307
Hi, We want to write a program (Prog_A) to check the activities of another program (Prog_B). If there is no activity on the Prog_B for a period of time, the Prog_A need send a message to close the Prog_B. Is it possible to write a program to check the activities of another program in C# ? Thank you in advance! David - |
| Igor
Registered User |
Wed Apr 18 10:22:27 CDT 2007
Re:A Program To Check The Activities Of Another Program
david <david@discussions.microsoft.com>wrote:
QuoteWe want to write a program (Prog_A) to check the activities of another -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925 - |
| Larry
Registered User |
Wed Apr 18 10:56:58 CDT 2007
Re:A Program To Check The Activities Of Another ProgramQuoteWe want to write a program (Prog_A) to check the activities of another to you for instance (so you can modify it as required) or is it some random program you want to shut down if there's no activity. If so then no, it's usually not possible to do it reliably or safely. - |
| david
Registered User |
Wed Apr 18 12:44:02 CDT 2007
Re:A Program To Check The Activities Of Another Program
Thanks Igor and Larry.
The activity means the usage of the program, and Prog_B doesnâ??t belong to us. We have a limit of licenses for this program (Prog_B). Some user might open this program, but doesnâ??t really use it. In this case, it will be nice if we can close it on his/her machine, and then another user can use it. From what Larry said, it is not possible to do it. We will try to find other solutions. Thanks again, David "david" wrote: QuoteHi, |
| Larry
Registered User |
Wed Apr 18 13:09:17 CDT 2007
Re:A Program To Check The Activities Of Another ProgramQuoteThanks Igor and Larry. it down if there's little activity, there's really no practical way to know when activity has dropped completely to zero (or if it will pick up again the moment you try to close it). More importantly perhaps, you can't cleanly shut it down anyway since you don't know what it's doing at the time. Perhaps it's in the middle of saving something to disk for instance so if you terminate it then you do so at your own risk (potentially corrupting something). If you know for sure that it's safe to do this however depending on the nature of the app, and it will continue to be safe when future versions are released (big assumption), then see here for details. support.microsoft.com/kb/178893">support.microsoft.com/kb/178893 - |
| david
Registered User |
Wed Apr 18 14:08:03 CDT 2007
Re:A Program To Check The Activities Of Another Program
"Larry Smith" wrote:
QuoteWhile you can monitor its CPU usage if you really want, and attempt to shut Thank you for the good idea about monitoring CPU usage. It might be a practical way in my case. I will try it out. Thanks, David - |
| Ben
Registered User |
Thu Apr 19 20:33:55 CDT 2007
Re:A Program To Check The Activities Of Another Program"Larry Smith" <no_spam@_nospam.com>wrote in message Quote>Thanks Igor and Larry. less likely to cause data loss. - |
| ajk
Registered User |
Fri Apr 20 10:52:23 CDT 2007
Re:A Program To Check The Activities Of Another Program
On Wed, 18 Apr 2007 12:08:03 -0700, david
<david@discussions.microsoft.com>wrote: Quote"Larry Smith" wrote: the reactions of the program, thay way you can get a hint if it is still reacting. of course this only works if it is a gui program with a message q. hth/ajk - |
