Click here for AnswerPool.com Home page


Google

    AnswerPool.com  Hop To Forum Categories  Computers  Hop To Forums  Software    simple batch program

Moderators: Dwight
Go
Post
Find
Notify
Tools
Reply
  
  Login/Join 
Diamond
Enthusiast

Posted
I created a batch file, but my dos (or I guess it's not really even dos anymore) skills are a bit rusty:

"F:\Programs\Eudora\Eudora.exe"
"F:\Programs\Trillian\trillian.exe"
"F:\Programs\Opera\opera.exe"

To run a few programs that I usually start at once. It starts Eudora fine, but then doesn't do anything else until I close Eudora. Once I close Eudora, Trillian starts. Once I close Trillian, Opera starts. Once I close Opera, the command prompt closes. What do I do for these to all run at once?

(I'm running WinXP Pro)
 
Posts: 5891 | Location: Indiana | Registered: 06-13-02Reply With QuoteEdit or Delete MessageReport This Post
Gold Enthusiast
Posted Hide Post
Precede each command with Start.

The 16-bit (real-mode) command processor under DOS and Windows 3.x/9x/ME can launch 32-bit (protected-mode) programs, but afterward cannot interact with them. In a batch file, the command processor simply launches the 32-bit executables in sequence without waiting for any to end.

The command processor under NT/2000/XP is itself a 32-bit program and does not have this limitation. It can and does wait for the each program to terminate before launching the next.

Start.exe was originally designed to provide a hybrid bridge between 16-bit DOS and the 32-bit Windows kernel. DOS will wait for Start.exe to quit, while Start.exe may wait for the 32-bit program to quit. A batch file consisting of

Start /W prg1.exe
prg2.exe


Will run prg1.exe, wait until it ends, then run prg2.exe.

The Win NT/2K/XP version of Start.exe allows it to launch a 32-bit process, then terminate itself, which allows the command processor to immediately launch the following program. Under NT-based OSes, this is the only way to launch programs asynchronously with a batch file.
 
Posts: 915 | Location: Dawson Ck. BC Canada | Registered: 06-03-02Reply With QuoteEdit or Delete MessageReport This Post
Diamond
Enthusiast

Posted Hide Post
Tried that already. When I use start, I get three additional command prompts opening up, but none of the programs run.
 
Posts: 5891 | Location: Indiana | Registered: 06-13-02Reply With QuoteEdit or Delete MessageReport This Post
Gold Enthusiast
Posted Hide Post
Try inserting a dummy first parameter, i.e.,

Start " " prg1.exe
 
Posts: 915 | Location: Dawson Ck. BC Canada | Registered: 06-03-02Reply With QuoteEdit or Delete MessageReport This Post
Gold Enthusiast
Picture of Byter
Posted Hide Post
Hi guys:
I got start to work fine for me on my machine, Started two instanses of notepad and one of WinWord.

start /m notepad.exe
start /m winword.exe
start /max notepad.exe


I did try it on a Win'95 machine though. Red Face

From the DOS window you can type Start /? and get a list of the available "Window Type" switches.

Best of luck Methos
Mike b. (AKA Byter)
 
Posts: 1052 | Location: Sun Valley, Calif. :^þ | Registered: 06-03-02Reply With QuoteEdit or Delete MessageReport This Post
Diamond
Enthusiast

Posted Hide Post
Thanks. The /m switch didn't change anything, but adding "" made everything work perfectly.
 
Posts: 5891 | Location: Indiana | Registered: 06-13-02Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

    AnswerPool.com  Hop To Forum Categories  Computers  Hop To Forums  Software    simple batch program

© 2002-2008 AnswerPool.com



Visit DiscussionPool.com!