If your using BNU type: BNU /B |
If your using XDO type: XU BOOT | N COLDBOOT.COM
If your using 4DOS type: REBOOT | E 0100 48 50 53 CB 0D 0A
------------------------------------+ RCX
Flush your Disk Cache before you use| 0006
!!!! any of these methods !!!! | W
for Smartdrive this is: SMARTDRV /C | Q
=============================================================
These should work in MS-DOS 6.22/Windows 3.11. Use at your own risk. :: warmboot.bat
@ECHO E 0040:0072 34 12 >%temp%.\reboot.dat
@ECHO G=FFFF:0000 >>%temp%.\reboot.dat
@DEBUG.EXE <%temp%.\reboot.dat >nul
:: coldboot.bat
@ECHO G=FFFF:0000 | DEBUG.EXE >nul
=============================================================
For Win 9x and NT (extracted from article in PC Magazine) ...
Close all programs and prompt you to log on:
rundll32.exe shell32.dll,SHExitWindowsEx
A complete system reboot, use the command line:
rundll32.exe shell32.dll,SHExitWindowsEx 2
Power down the system (for laptops):
rundll32.exe shell32.dll,SHExitWindowsEx 5
from other sources ...
rundll32.exe User.exe,ExitWindowsExec 5 % restarts %
rundll32.exe User.exe,ExitWindows % shuts down %
I believe the part after the commas may be case sensitive.
From MSDN:
-----------
rundll32.exe shell32.dll,SHExitWindowsEx n
...where n is one of the following...
0 - LOGOFF
1 - SHUTDOWN
2 - REBOOT
4 - FORCE
8 - POWEROFF
LOGOFF - Shuts down all running processes, then logs the
user off.
POWEROFF - Shuts down the system and turns off the
power. The system must support the power-off feature.
REBOOT - Shuts down the system and then restarts the
system.
SHUTDOWN - Shuts down the system to a point at which it is
safe to turn off the power. All file buffers have been flushed to
disk, and all running processes have stopped.
FORCE - Forces processes to terminate. When this flag is set,
Windows does not query running applications to inform them
that Windows is shutting down. This can cause the applications
to lose data, therefore, you should only use this flag in an
emergency.
==========================================================
* Closing a DOS window in Windows versions newer than 3.1x *
If it can be assures that the ANSI.SYS driver is not loaded and/or that
the background color of the window is black, then just add these two
commands at the end of the procedure ...
cls
@exit
BTW, a colored background is considered non-blank (set via an ANSI
string). If the desire is to be iron clad, even when ANSI.SYS is
loaded, use ...
for %%v in ("prompt $e[m" "echo on" cls) do %%v
@exit
Regardless of the status of the display, checking the 'Close on exit'
selection on the Program tab of a shortcut to the batch procedure will
ALWAYS cause the window to close.