home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2002 March
/
PCWorld_2002-03_cd.bin
/
Software
/
TemaCD
/
winres95
/
rescue64.exe
/
cmosboot.bat
< prev
next >
Wrap
DOS Batch File
|
1999-05-12
|
3KB
|
119 lines
@echo off
:: This file goes with WinRescue by Super Win Software
:: Copyright 1999 by Ray Geide - All Rights Reserved
cls
if "%1" == "CMOS" goto cmos
if "%1" == "BOOT" goto boot
:cmos
if not exist CMOSSAVE.COM GOTO Missing
if not exist CMOSREST.COM GOTO Missing
if not exist NEED.COM GOTO Missing
GoTo KeepGoing
:Missing
Echo.░▒▓█ Error █▓▒░
Echo The following files must be on the boot disk
Echo in order to restore CMOS.
Echo If any are missing, please remake the boot disk
Echo or copy them from the WinRescue directory.
Echo.
Echo CMOSSAVE.com, CMOSREST.com., and NEED.com
Echo.
pause
GoTo Done
:KeepGoing
::REM Only bother to check CMOS on the AT-style BIOS, not XT
NEED.COM AT > NUL:
IF Errorlevel 1 GOTO DONE
IF NOT EXIST CMOS.SAV GoTo MakeIt
::REM save "corrupted" current contents of CMOS just in case
echo Backing up CMOS before Restore.
CMOSSAVE.COM CMOS.OLD /Q
::REM try restoring
echo Restoring CMOS.
CMOSREST.COM CMOS.SAV /Q
IF NOT Errorlevel 1 GOTO Reboot
Echo Unable to write to CMOS. Do you want to restore
Echo the old CMOS?
echo.
echo Press CTRL and Break to skip restoring
echo the old CMOS. Any other key to continue.
pause
CMOSREST.COM CMOS.OLD /Q
Echo.
:Reboot
Echo You need to restart the computer before these
Echo changes will take effect.
goto done
:MakeIt
::REM Build a NEW CMOS.SAV file
Echo Backup of CMOS not found. Backing up CMOS Now.
CMOSSAVE.COM CMOS.SAV /Q
Echo.
Pause
goto done
:boot
if not exist BOOTSAVE.COM GOTO Missing2
if not exist BOOTREST.COM GOTO Missing2
IF NOT EXIST BOOT.SAV GoTo MakeIt2
::REM save "corrupted" current contents of BOOT just in case
echo Backing up Boot Sector before Restore.
BOOTSAVE.COM BOOT.OLD /Q
::REM try restoring
echo Restoring Boot Sector.
BOOTREST.COM BOOT.SAV /Q
IF NOT Errorlevel 1 GOTO Reboot
Echo Unable to write Boot Sector. Do you want to restore
Echo the old Boot Sector?
echo.
echo Press CTRL and Break to skip restoring the
echo old Boot Sector. Any other key to continue.
pause
BOOTREST.COM BOOT.OLD /Q
Echo.
goto done
:MakeIt2
::REM Build a NEW BOOT.SAV file
Echo Backup of the Boot Sector not found. Backing up
Echo Boot Sector now.
BOOTSAVE.COM C:\SAFE\BOOT.SAV /Q
Echo.
Pause
goto done
:Missing2
Echo.░▒▓█ Error █▓▒░
Echo The following files must be on the boot disk
Echo in order to restore the Boot Sector.
Echo If any are missing, please remake the boot disk
Echo or copy them from the WinRescue directory.
Echo.
Echo BOOTREST.com and BOOTSAVE.com
Echo.
pause
GoTo Done
:DONE
pause
::REM -30-