home *** CD-ROM | disk | FTP | other *** search
- @echo off
- REM ****************************************************************
- REM *** Reboot_2.bat - Reboot computer by jumping to BIOS reboot ***
- REM *** routine. This is an example of the CEnvi ***
- REM *** asm() function. To provide protection ***
- REM *** from accidentaly rebooting, you must ***
- REM *** enter PLEASE as the first parameter. ***
- REM ****************************************************************
-
-
- REM **************************************************************
- REM *** Check that "PLEASE" is the first parameter. CEnvi ***
- REM *** return errorlevel if it is not please. ***
- REM **************************************************************
- CEnvi return( strcmpi("%1","Please") ? 1 : 0 )
- if errorlevel 1 GOTO PLEASE
-
- REM **************************************************************
- REM *** A routine for rebooting is in the BIOS at location ***
- REM *** FFFF:0000. To reboot, will use the CEnvi asm() ***
- REM *** to execute the machine code: JMPF FFFF:0000, which in ***
- REM *** machine code is the byte sequence EA 00 00 FF FF. ***
- REM **************************************************************
- CEnvi poke(0x472,0x1234,UWORD16); asm('\xEA\x00\x00\xFF\xFF');
-
- :CENVI_EXIT
-
- :PLEASE
- ECHO Reboot_2.bat will reboot your computer. To execute Reboot.bat you
- ECHO must enter: REBOOT_2 PLEASE