Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

A Program Controlling Another Program


  • Please log in to reply
10 replies to this topic

#1 yano

yano

    I can see what you post!


  • Members
  • 6,469 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:03:12 PM

Posted 19 November 2005 - 09:55 AM

Does anybody know what program I would need, or how I would do this:

I want Program A to close if program B crashes or is closed, too. Anybody know how I could do something like this?

BC AdBot (Login to Remove)

 


#2 Joshuacat

Joshuacat

    01001010 01000011


  • Members
  • 1,950 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Ontario, Canada
  • Local time:04:12 PM

Posted 19 November 2005 - 10:26 AM

I am not sure if this is exactly what you want to do.
Here it is anyways.

From - http://www.pcworld.com/resource/article.asp?aid=15711&pg=6

Close Multiple Programs

Want to close several programs at once? Aaron Wille of Denver showed me an easy way to do it. Start by clicking one of the programs on the taskbar. Then hold down Ctrl while you select other programs you want to terminate. When they are all highlighted, right-click one, select Close, and watch them all go in one fell swoop. Unfortunately, the taskbar doesn't offer a "select all" option. So if you have many programs running, this trick doesn't provide you with a really easy way to close every one.


JC

#3 yano

yano

    I can see what you post!

  • Topic Starter

  • Members
  • 6,469 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:03:12 PM

Posted 19 November 2005 - 02:52 PM

Not exactly. See I want this to be done when I'm not around, I want it to be automatic.

#4 Rimmer

Rimmer

  • Members
  • 2,159 posts
  • OFFLINE
  •  
  • Location:near Sydney, Australia
  • Local time:06:12 AM

Posted 19 November 2005 - 08:01 PM

I'm just guessing - but if you can share a variable between 2 programs you could make program B update the variable (like var=var+1) and then have program A check to see if it has changed in some timeframe. If the variable has not changed in some reasonable time (say 10 seconds?) then you assume prog B has crashed/closed and close prog A.
Maybe. :thumbsup:

Soltek QBIC, Pentium 4 3.0GHz, 512MB RAM, 200GB SATA HDD, ATI Radeon 9600XT 256MB, Netgear 54Mb/s WAP, ridiculously expensive Satellite Broadband
Windows XP Home SP2, Trend Micro Internet Security, Firefox, Thunderbird, AdAwareSE, Spybot S&D, SpywareBlaster, A-squared Free, Ewido Security Suite.

#5 Joshuacat

Joshuacat

    01001010 01000011


  • Members
  • 1,950 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Ontario, Canada
  • Local time:04:12 PM

Posted 19 November 2005 - 08:45 PM

Yano: So what exactly are you trying to do? Be more specific. Are you trying to control 2 custom applications, or are you trying to control "off the shelf" products.

What are the specific products are you trying to control. Why are you attempting to do this?

Thanks,
JC

#6 yano

yano

    I can see what you post!

  • Topic Starter

  • Members
  • 6,469 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:03:12 PM

Posted 19 November 2005 - 10:59 PM

I'm am using Shareaza and PeerGuardian2.

I want it so, when PeerGuardian2 crashes, I want Shareaza to close as soon as PG2 crashes or is closed. Is this possible? Would I have ro re-write one of these programs or is their a 3rd party program that I could use to do this?

#7 Joshuacat

Joshuacat

    01001010 01000011


  • Members
  • 1,950 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Ontario, Canada
  • Local time:04:12 PM

Posted 20 November 2005 - 02:02 PM

Yano: Not sure on how you would do that with the programs that you mention...
Anyone else...

:thumbsup: Maybe this is for another topic, does PG2 work?
I have my doubts that it works as great as everyone in the P2P community thinks it does.
If someone really wants to track your indentity... they will find a way...

Take care,
JC

#8 yano

yano

    I can see what you post!

  • Topic Starter

  • Members
  • 6,469 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:03:12 PM

Posted 20 November 2005 - 07:05 PM

I don't care about the "0MG! 7hey go7 my IP!!!"

I'm just doing it to avoid people with corrupt chunks of files, and to avoid people who are known to spread viruses and other files.

Yea PG2 does work, however sometimes (once in a while) it will just close for no reason no error messages or anything. Just thought if it could be done. Oh well...

Edited by yano, 20 November 2005 - 10:35 PM.


#9 BanditFlyer

BanditFlyer

  • Members
  • 283 posts
  • OFFLINE
  •  
  • Local time:12:12 PM

Posted 20 November 2005 - 10:02 PM

Yano,

I would try this question in the programming forums. I once had a proram set up to ping a computer to check if it was up. If the server didn't send the expected response, the machine that was sending the ping request would send a page to a pager to alert one of our team members that the server was down.

It's been too long ago since I've done that to offer details on how you could write a similar program. My guess would be that hopefully these programs have command line interfaces - you could write something that would send an echo request to the command lines of the programs. If your echo-ing program didn't receive a certain expected answer within a certain time frame, you should be able to do something along the lines of a unix 'kill -9' to the program that is down, or to both programs.

Ask the programming guys. It will be interesting to see if this problem can be solved.

#10 yano

yano

    I can see what you post!

  • Topic Starter

  • Members
  • 6,469 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:03:12 PM

Posted 20 November 2005 - 10:34 PM

Unfortunately they both don't have a command line. However they both are open source and I can get the code if need be.

#11 donzo44

donzo44

  • Members
  • 39 posts
  • OFFLINE
  •  
  • Location:Carnoustie, UK
  • Local time:08:12 PM

Posted 21 November 2005 - 06:32 AM

Hi

I remember way back, and I mean WAY BACK, there was a program which monitored events e.g. SCREEN events, PROGRAM events, TIMER events etc. etc. This was in the days of memory resident stuff. No doubt there is some modern stuff out there?

Google for 'software to monitor PC events' brought up some interesting stuff which MAY be useful.

Regards

Bryan
Dual Opteron 250's, 1.6TB, youngest son still at home, large electricity bill




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users