Continue on CMD window close.

A

Alexander

I have a batch file (labeled batch1) that executes another
batch file (batch2) in a seperate window (using
START /q /c "batch file"). Batch1 should then pause. The
batch2 windows closes after it has finished (thanks to /c)
and now batch1 should continue executing. How do I get
batch1 to resume after batch2 has finished??

thanks,
alexander sid.
 
A

Alexander

Very nice,

Thank you Dean.
-----Original Message-----
Use -

start /wait <2nd batch file>

HTH

Dean

--
Dean Wells [MVP / Windows platform]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l


Alexander said:
I have a batch file (labeled batch1) that executes another
batch file (batch2) in a seperate window (using
START /q /c "batch file"). Batch1 should then pause. The
batch2 windows closes after it has finished (thanks to /c)
and now batch1 should continue executing. How do I get
batch1 to resume after batch2 has finished??

thanks,
alexander sid.


.
 
D

Dean Wells [MVP]

Start /wait /min will provide the additional feature you requested.

start /? will provide you with a full list of available switches.

Dean

--
Dean Wells [MVP / Windows platform]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l


Alexander said:
Very nice,

Thank you Dean.
-----Original Message-----
Use -

start /wait <2nd batch file>

HTH

Dean

--
Dean Wells [MVP / Windows platform]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l


Alexander said:
I have a batch file (labeled batch1) that executes another
batch file (batch2) in a seperate window (using
START /q /c "batch file"). Batch1 should then pause. The
batch2 windows closes after it has finished (thanks to /c)
and now batch1 should continue executing. How do I get
batch1 to resume after batch2 has finished??

thanks,
alexander sid.


.
 
A

Alexander

One more thing, using the "start /wait" command, how could
I make the second batch file run hidden or minimized?

Thanks,
Alexander Sid
-----Original Message-----
Use -

start /wait <2nd batch file>

HTH

Dean

--
Dean Wells [MVP / Windows platform]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l


Alexander said:
I have a batch file (labeled batch1) that executes another
batch file (batch2) in a seperate window (using
START /q /c "batch file"). Batch1 should then pause. The
batch2 windows closes after it has finished (thanks to /c)
and now batch1 should continue executing. How do I get
batch1 to resume after batch2 has finished??

thanks,
alexander sid.


.
 
P

Phil Robyn

Alexander said:
One more thing, using the "start /wait" command, how could
I make the second batch file run hidden or minimized?

Thanks,
Alexander Sid

I don't understand why you are using START in the first place.
Why don't you just have the BATCH1 file CALL BATCH2?
-----Original Message-----
Use -

start /wait <2nd batch file>

HTH

Dean

--
Dean Wells [MVP / Windows platform]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m

a i l
another

The

to /c)
 
M

Marty List

For minimized, read the syntax, "START /?" will show you the /MIN switch.

For hidden, you can redirect the output to NUL, but there will still be a
window. You can try my freeware ShellExecute.exe, which will launch a
process in a hidden window:
http://www.optimumx.com/download/
 
A

Alexander

CALL works nicely, but is there a way to let it run in the
background/without outputing anything at all??

Alexander Sid.

-----Original Message-----
Alexander said:
One more thing, using the "start /wait" command, how could
I make the second batch file run hidden or minimized?

Thanks,
Alexander Sid

I don't understand why you are using START in the first place.
Why don't you just have the BATCH1 file CALL BATCH2?
-----Original Message-----
Use -

start /wait <2nd batch file>

HTH

Dean

--
Dean Wells [MVP / Windows platform]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e
m

a i l
I have a batch file (labeled batch1) that executes
another

batch file (batch2) in a seperate window (using
START /q /c "batch file"). Batch1 should then pause.
The

batch2 windows closes after it has finished (thanks

to /c)
and now batch1 should continue executing. How do I get
batch1 to resume after batch2 has finished??

thanks,
alexander sid.


.


--
Phil Robyn
Univ. of California, Berkeley

u n z i p m y a d d r e s s t o s e n d e - m a i l

.
 
P

Phil Robyn

Alexander said:
CALL works nicely, but is there a way to let it run in the
background/without outputing anything at all??

Alexander Sid.

- - - - - - - - - - begin screen capture - - - - - - - - - -
C:\cmd>demo\batchone
this is batch one.
calling batch two.
returned from batch two.
press any key to finish.

C:\cmd>rlist demo\batchone.cmd
=====begin C:\cmd\demo\batchone.cmd ====================
1. @echo off
2. echo this is batch one.
3. echo calling batch two.
4. call c:\cmd\demo\batchtwo > nul
5. echo returned from batch two.
6. echo press any key to finish.
7. pause > nul
=====end C:\cmd\demo\batchone.cmd ====================

C:\cmd>rlist demo\batchtwo.cmd
=====begin C:\cmd\demo\batchtwo.cmd ====================
1. @echo off
2. echo this is batch two.
3. echo called from batch one.
4. echo returning to batch one.
=====end C:\cmd\demo\batchtwo.cmd ====================
- - - - - - - - - - end screen capture - - - - - - - - - -
-----Original Message-----
Alexander wrote:


could


I don't understand why you are using START in the first
place.

Why don't you just have the BATCH1 file CALL BATCH2?

posts ]]
m



--
Phil Robyn
Univ. of California, Berkeley

u n z i p m y a d d r e s s t o s e n d e - m a

i l
 
P

Phil Robyn

Dean said:
I guess he's using START because I recommended that he should :)
primarily because in the original post he specified the use of a second
window which I interpreted as a desired effect ... I may well have been
incorrect.

Dean

Yeah, that's also how I first interpreted his original post - that for
some reason he wanted a second window. Oh, well . . . we tried! :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top