PPRuNe Forums - View Single Post - Windows Registry
View Single Post
Old 9th February 2003 | 06:46
  #9 (permalink)  
Mac the Knife

Plastic PPRuNer
25 Anniversary
 
Joined: Sep 2000
Posts: 1,902
Likes: 0
From: Rochechouart, France
Maybe your registry files are on some marginal disc sectors. You can move them to another part of the disc. Boot with the Startup disc. Copy user.dat and system.dat (and policy.pol if it exists on your system) to backups, then rename the originals to something and finally rename the copies to the correct .dat extensions. Finally, set the hidden attribute.

You could put a batch file on your Startup disk to do all the work for you, like this.
[I haven't tested it, so use is up to you]

rem REGSWAP.BAT
cls
c:
cd\
cd windows
rem Copy the existing user.dat and system.dat files to backups
if exist user.bak goto error
if exist system.bak goto error
copy user.dat user.bak
copy system.dat system.bak
rem check that the backups exist and then rename the orginals to an arbitrary name
if exist user.bak rename user.dat userb.zzz
if exist system.bak rename system.dat systemb.zzz
rem Now rename the .bak copies to .dat
rename user.bak user.dat
rename system.bak system.dat
rem Set the hidden attribute
attrib +H user.dat
attrib +H system.dat
rem rename the arbitrary files to a sensible name
rename userb.zzz user.bak
rename systemb.zzz system.bak
goto end
:error
echo Cannot proceed. Either SYSTEM.BAK or USER.BAK already exist.
echo.
pause
:end
Mac the Knife is offline