SHUTDOWN.exe that works in DOS Mode?

Kelemvor

Lifer
May 23, 2002
16,928
8
81
Howdy,

I'm trying to make a batch file that I can boot off a DOS disk (Win 98 boot disk), run through some steps, and then have it reboot.

I can find all kinds of shutdown.exe files that work in various WIndows OS's but can't find one that works when botted up through DOS. Does anyone know where I can find this? Or some other way to force a computer to reboot when it's done running the script in DOS?

Thanks.
 

willstay

Member
May 4, 2005
83
0
0
Probably because DOS age computers had hard-touch switch to power down, there aren't any INT(errupt) numbers to trigger PC shutdown.
 

Kelemvor

Lifer
May 23, 2002
16,928
8
81
Any other way anyone can think of to force a reboot by faking a Ctrl-Alt-Del keypress or anything?
 

willstay

Member
May 4, 2005
83
0
0
I really don't recall but I guess there is few bytes (may be 16 bytes) for keyboard buffer accessible using INT 22 (or 23). I remember during old days, I had fed characters using this method. But don't know if you can use similar way to feed CAD.
 

willstay

Member
May 4, 2005
83
0
0
The actual INT for accessing keyboard buffer is

INT 16 (AH=05, CH=scan code, CL=ASCII char) and returns (AL=0 on success or 1 if buffer is full)

using this call you can push one ASCII char along with ScanCode (for Ctrl or Alt or Shift key). This doesn't describe how you can combine Ctrl and Alt (two scan codes at the same time) combined with ASCII for Del key. If I had time, I would like to see how ScanCode is captured using INT 9 (this int is for keyboard hook). Depending on how Ctrl + Alt is returned by INT 9, you may be able to push this combination of ScanCode with ASCII of Del key resulting CAD.
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
it's possible, my altiris server does it in it's boot files. Have you checked with Bart's Boot Disk?
 

purplehippo

Elite Member
Oct 22, 2000
45,626
12
81
If you can get a preloader disk there is one on there. I used to have one on a win 95 preloader disk. It would boot to DOS, format the HDD and then rebott. Don't know if you can extract anything from it.