home *** CD-ROM | disk | FTP | other *** search
- @ECHO OFF
- REM CHKCMOS.BAT -- ensures CMOS not damaged, repairs if it is.
- REM last updated by Roedy Green 92/01/14
- REM insert in AUTOEXEC.BAT to check CMOS.
-
- REM Only check CMOS on the AT-style BIOS
- C:\SYS\NEED.COM AT > NUL:
- IF Errorlevel 1 GOTO DONE
-
- IF NOT EXIST C:\SAFE\CMOS.SAV GoTo MakeIt
-
- C:\SYS\CMOSChk.COM C:\SAFE\CMOS.SAV
- IF NOT Errorlevel 1 GOTO DONE
-
- REM CMOS check failed:
- REM could be 2 reasons:
-
- REM 1. CMOS has been illegitimately tampered with
-
- REM 2. CMOS has been deliberately changed,
- REM Clever user will have to abort, and delete C:\SAVE\CMOS.SAV
-
- Echo Abort now with Ctrl-Break if you do not wish to restore damaged CMOS
- Pause
-
- REM try restoring
-
- C:\SYS\CMOSREST.COM C:\SAFE\CMOS.SAV
- IF NOT Errorlevel 1 GOTO Reboot
- Echo CMOS is still corrupted
- Pause
- :Reboot
- C:\SYS\Reboot.Com
-
- :MakeIt
-
- REM Build a NEW CMOS.SAV file
- Echo Recreating C:\SAFE\CMOS.SAV file.
- C:\SYS\MD! C:\SAFE
- C:\SYS\CMOSSAVE.COM C:\SAFE\CMOS.SAV
- Echo You might also want to create a new A: Rescue floppy boot disk soon
- Echo Use CMOSSAVE A:\CMOS.SAV
- Pause
-
- :DONE
- REM -30-
-