Creating a batch file to open two programs then close

Parasitic

Diamond Member
Aug 17, 2002
4,000
2
0
So I have Skype and this add-on USB VoIP device together. In order to use Skype with that USB phone thing and have it properly configured I need to run the handset program first, followed by the Skype executable. I'm not a fan of cluttering and I don't like the programs to start when I start Windows (since I don't use Skype on a daily basis).

So I thought I'd just create a DOS batch file and link a shortcut to it on my desktop, and have it open both files in sequence. Sounds easy enough to do.

Now the problem.

I can run the executables in command line, no problem. It allows those two programs to run in the background; but then when I put them in a batch file form, the batch will not continue until one program is opened then closed (by me, manually).

So I thought that maybe the background switch "&" would do the trick, and nope, it doesn't.
Now I seek the help of AT computer professionals to help me craft this batch file that opens these two programs without waiting for the first one to close. Anyone?

This is what I have so far (sk.bat):
@C:\Progra~1\Middle~1\CmSkype.exe &
@C:\Progra~1\Skype\Phone\Skype.exe &
@exit
 

juktar

Member
Jan 20, 2005
81
0
0
Use the Start command.

try this:

start C:\Progra~1\Middle~1\CmSkype.exe
start C:\Progra~1\Skype\Phone\Skype.exe
 

Parasitic

Diamond Member
Aug 17, 2002
4,000
2
0
Originally posted by: juktar
Use the Start command.

try this:

start C:\Progra~1\Middle~1\CmSkype.exe
start C:\Progra~1\Skype\Phone\Skype.exe

Mmmm...for some reason that does work. What's the difference, really though, between not using start and otherwise?
 

Ninjazx

Member
May 29, 2004
122
0
76
its just what the start command does by default. It doesnt really have any sort of required parameters for queueing or whatnot, just to start and go on.
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Originally posted by: Parasitic
Originally posted by: juktar
Use the Start command.

try this:

start C:\Progra~1\Middle~1\CmSkype.exe
start C:\Progra~1\Skype\Phone\Skype.exe

Mmmm...for some reason that does work. What's the difference, really though, between not using start and otherwise?

Start launches the process and then exits leaving the process running. Without it you'll start a process and wait for it to complete before moving to the next line it a batch file.

Try the following 4 commands from a command line to see what I mean:

cmd
exit
start cmd
exit