Computing.Net > Forums > Disk Operating System > Reboot command in DOS

Reboot command in DOS

Reply to Message Icon

Original Message
Name: Tristan
Date: November 1, 2002 at 13:23:28 Pacific
Subject: Reboot command in DOS
OS: DOS v6
CPU/Ram: P120/64
Comment:

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!


Report Offensive Message For Removal

Response Number 1
Name: Guti
Date: November 1, 2002 at 14:31:20 Pacific
Subject: Reboot command in DOS
Reply: (edit)

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...


Report Offensive Follow Up For Removal

Response Number 2
Name: jboy
Date: November 1, 2002 at 18:39:30 Pacific
Subject: Reboot command in DOS
Reply: (edit)

Check your email Tristan.


Report Offensive Follow Up For Removal

Response Number 3
Name: Tristan
Date: November 1, 2002 at 21:55:54 Pacific
Subject: Reboot command in DOS
Reply: (edit)

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.COM

Now, 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!


Report Offensive Follow Up For Removal

Response Number 4
Name: jboy
Date: November 1, 2002 at 22:09:44 Pacific
Subject: Reboot command in DOS
Reply: (edit)

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 ;)


Report Offensive Follow Up For Removal

Response Number 5
Name: HGT
Date: November 2, 2002 at 12:56:29 Pacific
Subject: Reboot command in DOS
Reply: (edit)

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:0000

r 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.


Report Offensive Follow Up For Removal


Response Number 6
Name: HGT
Date: November 2, 2002 at 13:06:38 Pacific
Subject: Reboot command in DOS
Reply: (edit)

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.


Report Offensive Follow Up For Removal

Response Number 7
Name: Konca
Date: November 4, 2002 at 21:16:00 Pacific
Subject: Reboot command in DOS
Reply: (edit)

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
-q

then you will notice that you have the reboot.com file. execute it to have a look.
^_^


Report Offensive Follow Up For Removal

Response Number 8
Name: jboy
Date: November 5, 2002 at 00:07:39 Pacific
Subject: Reboot command in DOS
Reply: (edit)

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


Report Offensive Follow Up For Removal

Response Number 9
Name: tristan
Date: November 7, 2002 at 08:38:38 Pacific
Subject: Reboot command in DOS
Reply: (edit)

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


Report Offensive Follow Up For Removal

Response Number 10
Name: tristan
Date: November 7, 2002 at 08:42:14 Pacific
Subject: Reboot command in DOS
Reply: (edit)

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?


Report Offensive Follow Up For Removal

Response Number 11
Name: jboy
Date: November 7, 2002 at 18:50:46 Pacific
Subject: Reboot command in DOS
Reply: (edit)

@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.com

is 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 ;)


Report Offensive Follow Up For Removal

Response Number 12
Name: tristan
Date: November 8, 2002 at 18:02:05 Pacific
Subject: Reboot command in DOS
Reply: (edit)

i tried adding the command "c:\windows\win.com" and i got this error about "himem.sys"


Report Offensive Follow Up For Removal

Response Number 13
Name: jboy
Date: November 8, 2002 at 20:34:06 Pacific
Subject: Reboot command in DOS
Reply: (edit)

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.


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Reboot command in DOS

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software