home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / SYSTEM / CMOS13.ZIP / CHKCMOS.BAT next >
Encoding:
DOS Batch File  |  1992-03-02  |  1.1 KB  |  47 lines

  1. @ECHO OFF
  2. REM CHKCMOS.BAT -- ensures CMOS not damaged, repairs if it is.
  3. REM last updated by Roedy Green 92/01/14
  4. REM insert in AUTOEXEC.BAT to check CMOS.
  5.  
  6. REM  Only check CMOS on the AT-style BIOS
  7. C:\SYS\NEED.COM AT > NUL:
  8. IF Errorlevel 1 GOTO DONE
  9.  
  10. IF NOT EXIST C:\SAFE\CMOS.SAV GoTo MakeIt
  11.  
  12. C:\SYS\CMOSChk.COM C:\SAFE\CMOS.SAV
  13. IF NOT Errorlevel 1 GOTO DONE
  14.  
  15. REM CMOS check failed:
  16. REM could be 2 reasons:
  17.  
  18. REM 1. CMOS has been illegitimately tampered with
  19.  
  20. REM 2. CMOS has been deliberately changed,
  21. REM    Clever user will have to abort, and delete C:\SAVE\CMOS.SAV
  22.  
  23. Echo Abort now with Ctrl-Break if you do not wish to restore damaged CMOS
  24. Pause
  25.  
  26. REM try restoring
  27.  
  28. C:\SYS\CMOSREST.COM C:\SAFE\CMOS.SAV
  29. IF NOT Errorlevel 1 GOTO Reboot
  30. Echo CMOS is still corrupted
  31. Pause
  32. :Reboot
  33. C:\SYS\Reboot.Com
  34.  
  35. :MakeIt
  36.  
  37. REM Build a NEW CMOS.SAV file
  38. Echo Recreating C:\SAFE\CMOS.SAV file.
  39. C:\SYS\MD! C:\SAFE
  40. C:\SYS\CMOSSAVE.COM C:\SAFE\CMOS.SAV
  41. Echo You might also want to create a new A: Rescue floppy boot disk soon
  42. Echo Use CMOSSAVE A:\CMOS.SAV
  43. Pause
  44.  
  45. :DONE
  46. REM -30-
  47.