Discussion Locked

Writing a batch file

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

To all you batch file writers:

here is my scenario

Objective: to write a batch file that launches program B when I start Program A, for eample start ZoneAlarm (and maybe some other programs) when I launch IE6.

The batch file will start whenwindows starts and monitor for when A is launched

It must also work across win98/2000/xp

Can it be done using batch files, firstly? If yes,
I'm a newbie here but a fast learner, so all help is appreciated

7 replies

by gigelul

Hi,
I think that you can't. Suppose that you have two line in your batch, first for launching program A and second for launching program B. When you run this batch, first line start program A and stop here until you close program A. After you closethe program A, your batch will continue to run the second line and launch the program B.
You must search in options of these programs if have some usefully conditions to acomplish your needs.

by blackcurrant

Hi

You can use the START command to open DOS or Windows programs. I don't think you can 'tell' program A to watch out for program b but you can start both programs together (or configure one program to watch for the other internally). Open notepad and type

start programApath\filename.exe
start programBpath\filename.exe

For example

start iexplore.exe
start zonealarm

Save the file with a .bat extension and save it wherever you like. Create a shortcut to it on the desktop so you can control how it operates (maximised, minimised, add extra switches etc.)

Type start /? at a DOS prompt for the range of parameters associated with this command

You get the drift?

Good luck

by manoj31450

Batch file may not be generic solution. You can always write program to monitor which application are running(Search for 'EnumWindows') and based on that start another application.Hope it helps.

This discussion is closed to new replies.