PDA

View Full Version : Linking two programs on XP



Curious
09-07-2004, 06:50 PM
I have been searching the net for a way to configure one program to automatically start when I start another program on Windows XP. For instance, I want to start my spam filter and have Outlook automatically start up when I start the spam filter (or vice versa). Or have IE start up automatically when my internet connection starts (I use the network connections to connect to the internet rather than the program that came with my DSL modem). Is there a way to link two programs to one start up click? Thanks.

seqiro
09-08-2004, 08:59 AM
Create a batch file that launches them both at the same time. That's probably the easiest way.

Curious
09-11-2004, 09:09 AM
How do I do that? Thanks.

Jeffbx
09-13-2004, 04:16 AM
That may not work - the batch file will process the launch commands sequentially, so if you enter it like this:

@echo off
"C:\program files\ProgramA\RunA.exe"
"C:\program files\ProgramB\RunB.exe"

it will fire off program A, but it won't return control to the batch file to run program B until program A exits. Anyone know a way around this?

Dman33
09-13-2004, 10:46 AM
That may not work - the batch file will process the launch commands sequentially, so if you enter it like this:

@echo off
"C:\program files\ProgramA\RunA.exe"
"C:\program files\ProgramB\RunB.exe"

it will fire off program A, but it won't return control to the batch file to run program B until program A exits. Anyone know a way around this?

You could try using the start command.
start <window title> <command> Starts a new command session and runs a given command. Unlike with the call command, the current batch file’s execution continues.

So, the batch file would be:
@echo off
start "C:\program files\ProgramA\RunA.exe"
start "C:\program files\ProgramB\RunB.exe"

Let me know if this works. If not, you may have to do it in VBScript which seems like massive overkill for a simple task!

seqiro
09-14-2004, 11:08 AM
I'm not sure if your example will work, at least not on Windows XP. I think what that will do is load two new command interpreter windows with the titles "C:\program files\ProgramA\Runa.exe" and "C:\program files\ProgramB\RunB.exe" in the title bar.

It should work if you include a window title like this:

@echo off
start "Outlook Express" "C:\Program Files\Outlook Express\msimn.exe" /B
start "Firefox" "C:\Program Files\Mozilla Firefox\firefox.exe" /B

The /B just keeps it from opening up a new command interpreter each time.

Oh and Curious, you can create a batch file with any text editor like notepad. Just make sure that the file name ends in .BAT and nothing else. Notepad likes to tack on .TXT especially if you have extensions hidden.

Dman33
09-14-2004, 11:39 AM
I see. My understanding was if start was passed one arg, then it would be the program file. At least, that is how it seems to work in Win 2000.

Curious
09-22-2004, 12:55 AM
Jeffbx: Thanks. That worked. I was wondering how I might do the same with something that doesn't have a target that I can link. For instance, with my new computer, I sign on to the internet with the network connection provided by XP. However, this isn't linked to Internet Explorer so I need to click on the IE icon. I can't copy the path for the internet connection because there isn't one. The target is a string of letters and numbers. Is there a way to create a batch command for this? Thanks.

Jeffbx
09-27-2004, 04:04 AM
You mean to just launch IE? Path should be something like this:

"C:\Program Files\Internet Explorer\iexplore.exe"

Curious
09-28-2004, 01:11 PM
It's not Internet Explorer that's the trouble with the batch command. It's my internet connection. The target is a string of letters and numbers rather than an address like IE or other programs. It is a network connection on XP that links my internet access (and not the browser). How do I include this string of letters and numbers into the batch command? Thanks.

Jeffbx
09-28-2004, 01:20 PM
Within IE, Under Tools.. Internet Options.. Connections.. click the button that says 'dial whenever a network connection is not present'. That should automatically start your internet connection when IE is launched.