@echo off
echo.
IF NOT !%WINDIR%==! GOTO DOSMODE
echo			WARNING
echo	All current copies and backups of your Registry are about to be moved 
echo	to a backup folder and replaced by files saved in Recov directory.
echo	If you don't wish to proceed press "Ctrl-C" or
Pause

MD %winbootdir%\Sysave

If Exist  %winbootdir%\system.da0 attrib -h -r -s %winbootdir%\system.da0
If Exist  %winbootdir%\system.da0 move %winbootdir%\system.da0 %winbootdir%\Sysave
If Exist  %winbootdir%\user.da0 attrib -h -r -s %winbootdir%\user.da0
If Exist  %winbootdir%\user.da0 move %winbootdir%\user.da0 %winbootdir%\Sysave
attrib -h -r -s %winbootdir%\system.dat
move %winbootdir%\system.dat  %winbootdir%\Sysave
attrib -h -r -s %winbootdir%\user.dat
move %winbootdir%\user.dat  %winbootdir%\Sysave

If Exist  %winbootdir%\sysbckup\rb???.cab move %winbootdir%\sysbckup\rb???.cab %winbootdir%\Sysave

copy %winbootdir%\win.ini %winbootdir%\Sysave
copy %winbootdir%\system.ini %winbootdir%\Sysave
copy %winbootdir%\protocol.ini %winbootdir%\Sysave

echo.
echo	All copies of Registry have been moved to a backup folder
echo	Saved files are now being copied to system.

If Exist attrib -h -r -s %winbootdir%\system.dat
attrib -h -r -s system.da0
copy system.da0 %winbootdir%\system.dat
If Exist attrib -h -r -s %winbootdir%\user.dat
attrib -h -r -s user.da0
copy user.da0 %winbootdir%\user.dat
attrib -h -r -s %winbootdir%\command.com
attrib -h -r -s command.com
copy command.com %winbootdir%\command.com
copy win.ini %winbootdir%\win.ini
copy system.ini %winbootdir%\system.ini
copy protocol.ini %winbootdir%\protocol.ini

If Exist copy autoexec.bat \autoexec.bat
If Exist copy config.sys \config.sys
attrib -h -r -s \io.sys
copy io.sys \io.sys
attrib -h -r -s \msdos.sys
copy msdos.sys \msdos.sys

echo.
echo	Your registry has been replaced. It is important to RESET OR 
echo	RESTART YOUR COMPUTER BEFORE WINDOWS STARTS AGAIN. Otherwise 
echo	the current operation may fail. To undo this move and restore 
echo	original files, while in Dos Mode and in Recov folder type 
echo	Syscov at Prompt and press Enter.
goto end

:DOSMODE
echo.
echo	This program cannot be run in Windows
echo	Switch to Dos Mode and run Recov again.
echo	Type EXIT to return to Windows.
goto end

:end






