off the subject!

polarbear199
11-07-2001, 03:57 AM
anyone know how to get a batch file to close upon execution? (without having to type exit or hit the X?)

dcl3500
11-07-2001, 07:26 PM
It appears and I am not 100% certain of this, but if you put "@" in front of the last thing you execute it closes the window. You need to put this in front of each line.

BillSoo
11-07-2001, 10:05 PM
I seem to recall that if you shell command.exe with (I think) /c it will close when done.....


From www.thescarms.com:

'
' DOS Applications:
' Waiting for a DOS application is tricky because the DOS window never goes
' away when the application is done. To get around this, prefix the app that
' you are shelling to with "command.com /c".
'
' For example: lPid = Shell("command.com /c " & txtApp.Text, vbNormalFocus)

Yoda
11-08-2001, 03:34 AM
If I'm not mistaken the @ at the beginning of a line is an echo off parameter.

dcl3500
11-08-2001, 12:04 PM
That is what I thought too. But in testing it I found that with it in place in front of every line the window closed automatically unless there was an error. I am wondering if MS has been changing things again without telling us. images/icons/smile.gif I did not try BillSoo's suggestion though. I will tonight during playtime.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum