Go Back   PCMech Forums > Windows Support > Windows Legacy Support (XP and earlier)

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 12-27-2005, 01:41 PM   #1
Member (2 bit)
 
Join Date: Dec 2005
Posts: 3
Boom Writing batch file to start 3 programs....

Hi guys. If you happen to be familiar with the pitstop forums, you might know me as "dmac2003". Anyways onto the real reason I posted this... I'm trying to write a batch file that will start 3 programs at once. My problem is, I just have extreme lack of programming skills. I've tried using this method, with no avail:

@echo off
start C:\Program Files\AIM\aim.exe
start C:\Program Files\MSN Messenger\msnmsgr.exe
start C:\Program Files\Yahoo!\Messenger\Ypager.exe
cls

My OS is Windows XP Pro




I attempt to run the batch, and I get an error stating "Windows cannot find C:\Program" What exactly am I doing wrong?
QuadTails The Kitsun is offline   Reply With Quote
Old 12-27-2005, 01:43 PM   #2
Come in Ray...
 
faulkner132's Avatar
 
Join Date: Sep 2004
Posts: 1,668
Put quotes around the file names:

start "C:\Program Files\AIM\aim.exe"
start "C:\Program Files\MSN Messenger\msnmsgr.exe"
start "C:\Program Files\Yahoo!\Messenger\Ypager.exe"
faulkner132 is offline   Reply With Quote
Old 12-27-2005, 01:44 PM   #3
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Put quotes around the file paths. Since there are spaces, Windows will be confuzzled without quotes.

start "C:\Program Files\AIM\aim.exe"
doctorgonzo is offline   Reply With Quote
Old 12-27-2005, 02:08 PM   #4
Member (2 bit)
 
Join Date: Dec 2005
Posts: 3
Erm...I'm not so sure how to explain this...





Code being used:

@echo off
start "C:\Program Files\AIM\aim.exe"
start "C:\Program Files\MSN Messenger\msnmsgr.exe"
start "C:\Program Files\Yahoo!\Messenger\Ypager.exe"
cls
QuadTails The Kitsun is offline   Reply With Quote
Old 12-27-2005, 02:11 PM   #5
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Are the programs actually being started?

Try leaving off the "start" command; just leave the file path.
doctorgonzo is offline   Reply With Quote
Old 12-27-2005, 03:06 PM   #6
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
Also leave off the echo off. This will allow you to see any error messages.
__________________

Want to Make $$$$ with your Computer? No Risk! Simply press shift-4 four times in a row
mairving is offline   Reply With Quote
Old 12-27-2005, 05:09 PM   #7
Member (2 bit)
 
Join Date: Dec 2005
Posts: 3
Alrighty, I've left both @echo off and start absent from the batch:

"C:\Program Files\AIM\aim.exe"
"C:\Program Files\MSN Messenger\msnmsgr.exe"
"C:\Program Files\Yahoo!\Messenger\Ypager.exe"
cls


This is again, hard to explain. I'll start the batch, but only one program will run. Being AIM, while the command window stays open. If I close AIM, MSN loads up. But as you'd expect, I'll close MSN, and Yahoo Messenger will load. There's something probably really simple I'm not coding properly, right?


EDIT: And in response to doctorgonzo's message, no, the programs are not actually being started.
QuadTails The Kitsun is offline   Reply With Quote
Old 12-28-2005, 10:42 PM   #8
Member (4 bit)
 
Join Date: May 2004
Location: Van Nuys, Calif.
Posts: 10
Check this out under "Launch Multiple Programs"

http://jeffwalso.tripod.com/batch.htm

Bugs
bug_zs is offline   Reply With Quote
Old 12-29-2005, 08:08 AM   #9
Come in Ray...
 
faulkner132's Avatar
 
Join Date: Sep 2004
Posts: 1,668
The Start command, by design, launches a new window. You should be able to just close it without effecting the programs you just launched.
faulkner132 is offline   Reply With Quote
Old 12-29-2005, 08:10 AM   #10
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Do the "start" thing again, but try doubling it:

start "C:\Program Files\AIM\aim.exe" "C:\Program Files\AIM\aim.exe"

According to the start command documentation, the first parameter is the title of the window, which is why you got those three black windows with the program names in the title in the first place. Doubling it may work to actually start the program.
doctorgonzo is offline   Reply With Quote
Old 01-02-2006, 11:08 PM   #11
Member (4 bit)
 
Join Date: May 2004
Location: Van Nuys, Calif.
Posts: 10
Quad,

Another way to go:

http://www.outertech.com/index.php?_...e=product&id=1

Batchrun will let you create batch files using a graphical interface. In the good old
days of DOS .bat files took care of this task. They still do, but they're not exactly
user friendly. With Batchrun .brs batch files you can launch any number of programs
or dialup connections with just a simple click. You can control the starting process
with many properties like priority or run mode and control their behavior a tad. You
can even do more than starting programs with the built-in file management functions
like Copy, Rename, Makedir, Delete and End Process. Batchrun batch files can be
launched from Explorer or placed in StartUp folder or on the Desktop.

Feature List


Launch files of any filetype
Internal commands: Run, Copy, Rename, Makedir, Delete, DelTree, End
Process
Wildcard support for Copy, Delete and DelTree
Makedir nested dir creation
Drag and Drop between Explorer and Batchrun
Support for date and time tags
Save batch files directly to Startup and Desktop

Give it a shot. It's free, dude.

Bugs
bug_zs is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:59 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2