On Wed, 11 Jun 2003 09:48:35 -0400 (EDT) barryc <[EMAIL PROTECTED]> wrote:
> >JC Simonetti wrote: > >Thus there is only one way to backup the loaded hives (and only one to restore > > them): using 2 Windows programs available in the Windows Resource Kit: > >_ regback.exe > >_ regrest.exe > >I cannot join them to this mail since they are not free, you will have to buy > > the Resource Kit to get them... > > > While I do not condone the circumvention of copyright, you can take advantage of > the fact that many people make entire directory trees web-accessible. If you > know the exact filename you're looking for (such as here), search Google for the > string: ` "index of" <filename1> <filename2> ...' Searching in this manner > yields 3 sites which have both files. Well... So many ways to get these files... This is one. Not very legal, but who minds? ;-) > > That having been said, these two programs are unnecessary. Every version of > Windows ships with a program called "RegEdit" - the Registry editor. > > If you boot to DOS, you can see the usage help by typing `regedit /?' If you > actually have the GUI loaded when you try running this command, regedit will > instead open the GUI window. > > However, assuming you are only interested in backups and restores, here's what > you want to know: > > To backup (export) the entire registry: > `regedit /e <DEST_FILENAME>' - NOTE: <DEST_FILENAME> should end in .reg > extension. On my WinXP PRO machine, the exported registry is 23,199,746 bytes. > > To import a registry file: > `regedit <SOURCE_FILENAME>' > For every key in <SOURCE_FILENAME>, set the value in the registry to that in the > file. This command only works if a valid registry exists. (read: the computer > can at least come up into "safe mode") Any entries which exist in the registry, > but not in <SOURCE_FILENAME> are preserved. For a system restore, this is not > what we want. > > To restore the registry: > `regedit /c <SOURCE_FILENAME>' > The `/c' flag tells regedit to create an empty registry (expunge the corrupted > one) and then fill the new registry with the entries stored in <SOURCE_FILENAME> > Have you tried to backup an entire registry and restore it with the regedit method? Because I think of a problem: the registry is composed of data but these data also have access rights. "regedit" does not display them (whereas "regedt32" does). So 3 solutions: 1. regedit does not show rights but backs up and restores them, so everything is OK and my solution is gone. 2. regedit does not handle access rights, but regedt32 does and is scriptable in the same way as you describe concerning regedit: so life is beautiful. 3. none of the 2 solutions above are correct and you have to come back to my solution. I don't think the first solution works. I know the third works, I've tested it with success. But I really don't know anything concerning the second one, and that would be a nice way to throw away my backup method... Just a last remark. When you want to restore registry, you must have a valid registry, whatever solution you choose (regedit, regedt32, regrest...). So if your computer crashes completely you have to reinstall a basic Windows before restoring anything else. If you want a solution that would not force you to reinstall a basic Windows before restoring, you have to backup your disks more basically, with utilities like "dd", or the MS commercial equivalent solutions like Ontrack DataRecovery or something else (sorry, cannot remember of other names).