running a .bat in win98... how do I?  | | |
November 21st, 2002, 03:50 AM
|
#1 (permalink)
| | Senior Member
Join Date: Oct 2001
Posts: 881
| running a .bat in win98... how do I?
get the ms-dos window to close after I have run the bat?
it's reallly short
@echo off
net use blahblahblha blahblah
(here is where I want a command to close the window)
thanks
-Z |
| |
November 21st, 2002, 04:06 AM
|
#2 (permalink)
| | nuisance since 1968
Join Date: Oct 2001 Location: ɐqɟs
Posts: 10,457
|
I used to know this ..... darn...I forget.
I think you just make the last line read "exit" (w/o the quotes). |
| |
November 21st, 2002, 04:21 AM
|
#3 (permalink)
| | Retired mostly.
Join Date: Oct 2001 Location: Finland
Posts: 5,144
|
Run the bat, press the little 'msdos' icon on the upper left corner when it finished. Select close automatically or something similar from the properties and it should not stay on top anymore.
I made that change quite a few times back when our virus scanner was updated via a bat file upon logon.
-M |
| |
November 21st, 2002, 03:28 PM
|
#4 (permalink)
| | Senior Member
Join Date: Oct 2001
Posts: 881
|
thanks muno... strange though, it creates a little msdos file to store that single setting in it. wierd
-Z |
| |
November 21st, 2002, 04:32 PM
|
#5 (permalink)
| | Member
Join Date: Sep 2002 Location: Cumberland MD
Posts: 154
|
The comand to exit a DOS box is "exit" (without the quotes). It works from the command line and it works in a script. |
| |
November 21st, 2002, 11:57 PM
|
#6 (permalink)
| | Senior Member
Join Date: Oct 2001
Posts: 881
|
believe me.. i tried it in the .bat file...
no luck and i don't know why
-Z |
| |
November 22nd, 2002, 01:33 PM
|
#7 (permalink)
| | Senior Member
Join Date: Oct 2001
Posts: 881
|
hehe.. but it still requires 2 files.... i'm just surprised that I can't integrate the close command directly into the bat file itself
-Z |
| |
November 22nd, 2002, 02:44 PM
|
#8 (permalink)
| | nuisance since 1968
Join Date: Oct 2001 Location: ɐqɟs
Posts: 10,457
|
Putting 'exit' as the last line of the batch should indeed work. If it doesn't try 'cls' right before the 'exit'. So your last two lines of the batch file should be: cls
exit
Make sure you have a carriage return after exit.
Last edited by OuTpaTienT : November 22nd, 2002 at 02:46 PM.
|
| |
November 22nd, 2002, 02:58 PM
|
#9 (permalink)
| | Member
Join Date: Feb 2002 Location: Kirkland, WA USA
Posts: 107
|
If you go into the properties of the bat file (right click choose properties) and choose close on exit. That option is in one of the tabs can't remember which. This should work for you.
**EDIT**
Sorry Steve didn't mean to repeat, should've read all the posts first. |
| |
November 22nd, 2002, 03:06 PM
|
#10 (permalink)
| | Senior Member
Join Date: Aug 2002 Location: Kzoo, MI
Posts: 883
|
Having "exit" at the end works fine in Win2k. I don't have Win98 installed to try it. |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |