Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am creating an "autoexec.bat" file on my floppy disk and after it does the commands I tell it to do (which currently works like a charm) I want it to automatically reboot the computer. Is there a file or command or something that I can add in the "autoexec.bat" file that will tell the computer to reboot? Thanx!

Download 4DOS at http://www.jpsoft.com, and once installed thy the REBOOT command.
You can also code a REBBOT utility your self, it is as easy as making a far jump to a memory location that actually I do not remember...

This is my current "Autoexec.bat" file:
@ECHO OFF
DEL c:\progra~1\hypert~1\Deepfr~1\*.*
DEL c:\config.sys
COPY a:\config.sys c:\config.sys
DEL c:\window~1\system\iosubsys\persifrz.vxd
REBOOT.COMNow, when it performs these comands, it does everything that it is supposed to, but I want to get rid of it asking me to choose yes or no when the DEL c:\progra~1\hypert~1\Deepfr~1\*.* command is brought up. When this disk first runs, it shows "Starting Windows 98 and then will show a few this about if file are copied or not, and if the file doesnt exist, it says file not found on the screen, and then will get to the reboot command and will reboot. Now, is there a way to automatically select yes without being prompted, and at the same time, keep everything hidden except the "Starting Windows 98" Thank you so much for you help everyone!

Try this
echo y | del c:\progra~1\hypert~1\Deepfr~1\*.* >nul
The 'echo y |' sends 'y' keystroke, because DOS always asks for confirmation when deleting all files in a directory.
'>nul' redirect to nul hides screen output generated for that line.
Mix and match as needed ;)

As Guti said; You can code a Reboot your self.
Use Debug:
debug
n reboot.com
a 100
mov ah,0d
int 21
mov ax,0040
mov ds,ax
mov ax,1234
mov [72],ax
jmp FFFF:0000r cx
14
w
q.....and you have a .com that reboots the pc that's performing a warm reboot. If a cold boot is needed just change "mov ax,1234" to "mov ax,abcd".
Got this from "DOS 6 Secrets" by Robert D. Ainsbury. (Thanks Robert)
If you execute "reboot.com" in windows the system simply reboots without questions.

About "executed in windows" in my message above:
Forgot to add that this is not the case in Win98 and above. Did never test in Win95.

you can create a 5 bytes .com file and append its filename to the autoboot.bat.
Now let's create the .com file:
c:\debug
a
jmp ffff:0
(enter)
rcx
5
nreboot.com
-w
-qthen you will notice that you have the reboot.com file. execute it to have a look.
^_^

All you folks posting debug script, that's great and all, but wouldn't it be just a bit more helpful to simply email the COM file to Tristan?
Oh, wait, that's what I did ;-)
carry on then

Ok. This is my command:
COPY a:\config.sys c:\config.sys
now, when it copies it, it says "1 File(s) copied" . how can i keep this from being displayed?
My full batch file is:
@ECHO OFF
echo y | del c:\progra~1\hypert~1\Deepfr~1\*.* >nul
DEL c:\config.sys
COPY a:\config.sys c:\config.sys
DEL C:\WINDOWS\SYSTEM\IOSUBSYS\persifrz.vxd
reboot.com

ok. well, now that you all helped me with the reboot command, i was wondering, is it possible to have it to continue loading windows after the commands are completed? if so, where do I begin?

@ECHO OFF
echo y | del c:\progra~1\hypert~1\Deepfr~1\*.* >nul
COPY /y a:\config.sys c:\ >nul
DEL C:\WINDOWS\SYSTEM\IOSUBSYS\persifrz.vxd
reboot.comis a little tidier *g*
Can't really advise you on the rest of your question - although you could try either EXIT or win I suppose.
have fun ;)

Ok, well, worth a shot. I'm more familiar with the old DOS programming than I am with Win9x.
What exactly is the purpose of the batch file?
Possibly the 'multi config' feature (in DOS6 and up) for the config.sys would be worth exploring.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |