1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Registry backup

Discussion in 'Legacy Windows' started by samson, 2003/10/17.

Thread Status:
Not open for further replies.
  1. 2003/10/17
    samson

    samson Inactive Thread Starter

    Joined:
    2003/03/22
    Messages:
    67
    Likes Received:
    0
    I want to go into the registry and delete entries that point to software I've uninstalled. I'm trying to make a registry backup by making copies of user.dat and system.dat (Windows 98SE). But DOS can't see these files! I boot into DOS, and

    cd c:\windows
    dir

    shows no user.dat or system.dat.

    Why not? Usually DOS shows more than is visible in Windows.

    OK, plan B. What if I make a copy of the latest .cab file in c:\windows\sysbckup, then if my registry diving causes problems more than 5 days down the road, I put that .cab copy back in sysbckup and do scanreg /restore? Will that work?

    I guess I could also have regedit export keys before I delete them. Is that method as straightforward as it seems, regedit will make .reg files that I just double click and the deleted key is put back?
     
  2. 2003/10/17
    PCDania

    PCDania Inactive

    Joined:
    2002/03/02
    Messages:
    11
    Likes Received:
    0
    The reason you can't see those two files in DOS is that they are hidden.

    For making a backup of the registry start regedit. Inside regedit go to Registrydatabase (option to the top-left) and choose Export Registryfile (or what it's called, it does say Export). Make sure you save the file somewhere where it's easy to find. The file you export will contain both user.dat and system.dat in a file with the extension .reg

    I'm translating from the Danish version so the translations from inside regedit is a bit incorrect, sorry.
     
    Last edited: 2003/10/17

  3. to hide this advert.

  4. 2003/10/17
    markp62

    markp62 Geek Member Alumni

    Joined:
    2002/05/01
    Messages:
    4,012
    Likes Received:
    16
    Plan B is a good idea. So is exporting the Key as before you start deleting Keys and Values [the stuff in the right pane]. You can only export Keys, you cannot export just one Value. The workaround for this is Export the Key that has the Value you want to get rid of, then delete the Value. Then Edit the Reg file so only the Value that you deleted remains in the Reg file.
     
  5. 2003/10/17
    PLansdowne

    PLansdowne Inactive

    Joined:
    2001/12/30
    Messages:
    175
    Likes Received:
    0
    You may want to take a bit of the fear away and download RegCleaner. The software will identify and remove old registry entries and will allow you to backup or delete those entries.
     
  6. 2003/10/17
    samson

    samson Inactive Thread Starter

    Joined:
    2003/03/22
    Messages:
    67
    Likes Received:
    0
    Ah, I'm learning a bit here. Good, maybe I won't mess things up. :D

    If I export the whole registry from regedit, then have to use that .reg file to recover, will that create duplicate entries? I remember reading somewhere that running a .reg file just adds to the registry whatever's in the file. I would hope Windows is smart enough not to do that, but then .....
     
    Last edited: 2003/10/17
  7. 2003/10/17
    samson

    samson Inactive Thread Starter

    Joined:
    2003/03/22
    Messages:
    67
    Likes Received:
    0
    PLansdowne

    Fear? What's that? I have NO FEAR! LOL

    Actually, I'll probably get RegCleaner later, but right now I'm on a quest to learn as much as I can.
     
  8. 2003/10/17
    BillyBob Lifetime Subscription

    BillyBob Inactive

    Joined:
    2002/01/07
    Messages:
    6,048
    Likes Received:
    0
    Some one may need to add their thoughts to my idea but;

    I do not believe that exporting the registry for use as a backup is a good idea.

    When it is imported it overwrites NOTHING. I believe it just more or less appends to the existing.

    The RB000.cab files are actual full backups and are safer to use. When restored they overwrite ( replace ) the complete registry.

    They backup/restore all four files which I am not sure export/import does.

    BillyBob
     
    Last edited: 2003/10/17
  9. 2003/10/18
    gammaepsilon

    gammaepsilon Inactive

    Joined:
    2003/04/27
    Messages:
    267
    Likes Received:
    0
    samson

    I agree with BillyBob. Exporting/Importing the whole registry was something Win95 users had to get involved in as scanreg didn't ship until Win98.

    Plan B will work but it is not advisable without renaming the saved backup as it will overwrite an existing one with the same name and the existing one could be anyone of the set of five in sysbckup; assuming you only use a five backup set. If you chose a name greater than the largest of the existing set then you'd have more than scanreg /restore can view. Its now getting a bit messy.

    BillyBob is right about only two files, ie System.dat and User.dat, being backed up on a full export. The additional files including the default System.ini and Win.ini are not backed up; unlike backups created by implementing scanreg at the Run command in a Windows session.

    On importing, via DOS, if the /C switch is used with Regedit then a new registry is built with the exported file. If the /C switch is not used then the export will be merged with the existing registry. Entries which exist in the export but not in the existing registry will be appended. Common entries will see the exisiting entry being overwritten by the exported entry; even if those entries are the same. No entries are duplicated. The analogy being A XOR B OR B where A is the existing registry and B the export.

    Best advice is to use only export for selected keys and not whole roots.

    Win95 users had a tough time of it!

    Be careful with RegCleaner. You may see some entries which you do not recognise. Some authors use aliases with registry entries bordering the cryptic. If in doubt leave well alone.
     
  10. 2003/10/18
    BillyBob Lifetime Subscription

    BillyBob Inactive

    Joined:
    2002/01/07
    Messages:
    6,048
    Likes Received:
    0
    Welcome aboard and good Morning gammaepsilon

    Also scanreg /restore has to be done from DOS. Either the command prompt from the F8 menu at boot up. OR if scanreg from the c:\Windows\Command folder is copied to the boot up floppy it can be run from there. This is quite handy in a case where a bit too much editing has been done. And seems to be easier than trying to catch the F8 menu.

    Or you can boot to the floppy and type;

    C:\Windows\Command\scanreg /restore

    It is not good to change the default name or location of the rb000.cab files. Scanreg /restore from DOS may not find them.

    BillyBob
     
    Last edited: 2003/10/18
  11. 2003/10/18
    WhitPhil

    WhitPhil Inactive

    Joined:
    2002/01/07
    Messages:
    599
    Likes Received:
    4
    As a BTW

    If you are running Me, Scanreg can be started via Start > Run
     
  12. 2003/10/18
    gammaepsilon

    gammaepsilon Inactive

    Joined:
    2003/04/27
    Messages:
    267
    Likes Received:
    0
    Good afternoon BillyBob. When you said '...good morning gammaepsilon' it was morning in Marlboro, NY but afternoon in London, England. Forums should have a mandatory entry in member's profiles, ie UTC offset , in addition to the optional Location. We can then include salutations such as Guten tag or G'day. This will not deter from the impression that we are all at the same table but simply help with regard where on the table. Just a thought. :)

    "It is not good to change the default name or location of the rb000.cab files. Scanreg /restore from DOS may not find them. "

    I've never had a problem with this. I have two versions of scanreg.ini viz scanreg.ini and scanreg.alt the latter pointing to another location. If I want to make a quick Windows backup for safety before testng an idea which may go pearshaped I'll backup to the alternative [alternate in Marlboro] location so as not to disturb my 'Started' set. I've written a small batch file which will either Toggle/Backup/Toggle or Toggle only. I'll employ the first option in Windows and, if the need arises, employ the second in DOS, restore then Toggle back. I don't bother to delete the alternative backup - I'll let the round robin of five work as normal and use the latest.

    I've been using ths technique for almost two years without a hitch.

    Each time I toggle, a file is created as a flag. On boot up I have a compiled Basic app running from autoexec.bat and one of its many duties is to advise if I have forgotten to toggle back to my standard scanreg.ini and offer to toggle back for me. I included that as I am absent minded - inate not old age. :D
     
    Last edited: 2003/10/18
  13. 2003/10/18
    gammaepsilon

    gammaepsilon Inactive

    Joined:
    2003/04/27
    Messages:
    267
    Likes Received:
    0
    WhitPhil

    I mentioned "scanreg at the Run command in a Windows session." above. Did you miss a switch in your statement?

    Samson is running 98SE - first post.
     
  14. 2003/10/18
    BillyBob Lifetime Subscription

    BillyBob Inactive

    Joined:
    2002/01/07
    Messages:
    6,048
    Likes Received:
    0
    gammaepsilon

    OK. I forgot ( or did not think ) about you being 5 hours ahead of me :(

    But I say AGAIN.

    I base my replys on the average user and the average default setup of Windows.

    If the user does have something different then it is up the same to let us know so we can work with them.

    You have the knowledge to make and have made changes which are fine for you.

    From this post and others that you and I have been invloved in it tells me that you have a VERY HIGHLY CUSTOMIZED machine. And I know full well that even though I know what you refer to, If I tried it and it did not go right I could be in BIG trouble.

    And I would venture to say that the average home user has no idea what you are even refering to.

    I myself do mess with some things but when it comes to things as important as the registry and backups of same NO MESSING around.

    BillyBob
     
  15. 2003/10/18
    gammaepsilon

    gammaepsilon Inactive

    Joined:
    2003/04/27
    Messages:
    267
    Likes Received:
    0
    Its very easy to forget where each one of us is - especially when the Internet is in fine fettle and emails are belting around the world at 3000 miles a second; between servers.

    I treat my PC like a rally car. I make sure I have a lot of spares on the course and even more at home base. I can live with writing the car off. If someone says "Oh, I couldn't do that" then I'd say "Don't rally then ". I finished an earlier post with "If in doubt leave well alone ".

    Experience is a perennial problem with any technical forum with a general membership. If anyone has an idea or has a working method of something out of the ordinary then it would be a shame if that idea was not posted because of a high likelihood that only a few would understand it. Of course, the real secret is in describing a complex method such that all can understand it. Very few us attain the likes of Richard Feyman who almost single handedly developed Quantum ElectroDynamics and wrote books on the subject which were readable as opposed to the scientific papers published. He was an amazing teacher but, boy, did he get his hands dirty as well.
     
    Last edited: 2003/10/18
  16. 2003/10/18
    WhitPhil

    WhitPhil Inactive

    Joined:
    2002/01/07
    Messages:
    599
    Likes Received:
    4
    gammaepsilon

    The post was specifically for BillyBob who made, what I took to be a general statement, on the use of Scanreg /Restore from DOS.

    And, I guess to really clarify, yes, I meant Scanreg /Restore not just Scanreg.

    Your post above in regard to running Scanreg from a Windows session, is in regard to taking a backup, not doing a restore.

    On Win98, you have to move to DOS to do a registry restore. On WinMe, it can be done via the Run Command.


    BTW as an addendum to your excellent explanation on the potential misuse of a registry export, there is one more condition.

    That is where a key/value is added to the live registry after the export has been done.
    Then, when the import occurs, that newly added key will still be there.

    Just another reason why doing an import via doubleclicking on the REG file is NOT a true registry restore.
     
    Last edited: 2003/10/18
  17. 2003/10/18
    gammaepsilon

    gammaepsilon Inactive

    Joined:
    2003/04/27
    Messages:
    267
    Likes Received:
    0
    WhitPhil

    "The post was specifically for BillyBob ". That was not known.

    My ref to scanreg during a windows session was in regard to backups - no ambiguity there.

    I take your point in regard to the further condition. I neglected to mention it in the text but it follows from 'A XOR B OR B'. I used the term analogy but, in fact, that is exactly how it works. I said overwritten to keep it simple - we have deletion followed by appending. Regedit isn't clever enough to ignore identical entries. This is one of the reasons the registry suffers from internal fragmentation analogous to heap fragmentation.
     
    Last edited: 2003/10/18
  18. 2003/10/18
    samson

    samson Inactive Thread Starter

    Joined:
    2003/03/22
    Messages:
    67
    Likes Received:
    0
    What about scanreg /fix and scanreg /opt?

    I'm assuming that /fix is something I don't want to do if I'm not having problems, right? All I'm doing right now is learning a bit while removing some deadwood from the registry. Hopefully, when problems really do occur I'll have a good idea how to proceed and it won't be such a mad scramble. My Windows is still the OEM installation, over 4 years old, so far so good.....

    Microsoft says that scanreg /opt is run automatically if Optimize=1 in scanreg.ini and there's more than 500K of wasted space in the registry. It sounds like I don't need to run that either, but could if I want.

    I copied the appropriate windows\sysbckup .cab file into another folder for my registry backup, and am using Regcleaner to remove software keys that I already knew were superfluous. Proceeding cautiously .....
     
  19. 2003/10/19
    gammaepsilon

    gammaepsilon Inactive

    Joined:
    2003/04/27
    Messages:
    267
    Likes Received:
    0
    samson

    A good case can be put forward for never using either /fix or /opt.

    Some folk think that a registry with both heavy internal and external fragmentation will impede on system performance. Since most of the registry is loaded into RAM both states are rendered academic except, of course, on loading. Both dat files are periodically flushed during a Windows session but not great chunks of data, for the most part, so their fragmentation, if any, shouldn't be a problem here either.

    As you say the internal fragmentation will not run amok as Windows will use /opt when its good and ready. Windows will use /fix if it ever needs to restore the registry automatically but only when all backups fail a scan.

    In a way you've answered your own question with "My Windows is still the OEM installation, over 4 years old, so far so good..... "

    On the other hand it is possible to have a faulty structure masking another faulty structure. Scanreg on fixing a fault will move on - it will not go back a step and repeat the exercise. I have read that one MS staff member recommended, if we decided to use either switch, using the sequence /fix and then /opt three times in succession. Mind you I have heard that he wears both a belt and braces and carries a spare belt in his briefcase, which may tell us something. :D

    Its a bit like putting off a car service. Eventually it goes in and the mechanic says X was just about to go and because X was inefficient it put a strain on Y and that didn't do Z any good. Had it gone in earlier and X had been replaced then both Y and Z would be nearly as good as new.

    For this reason I use /fix followed by /opt every two to four weeks depending upon both the internal and external fragmentation; got by using a third party app and DOS respectively. I usually remove between 100K and 300K of wasted space in the process.

    If someone said that I was wasting my time then I wouldn't argue except to say that it was my time being wasted. Who knows, I may have diverted a potential problem somewhere along the line. If I didn't bother I wouldn't want to be proved right!

    I've used /fix, successfuly, on registrys which Windows said were bad. I did this because I didn't care for Windows' choice of replacement and had nothing to lose in having a go. I have a home spun app which doesn't care what registry it is given to restore. However, its not something most folk would or should contemplate.

    I had a, so called, PC accelerator on board many years ago and it sneaked a scanreg /opt into my autoexec.bat file. All that did was to add another twelve seconds to my bootup time as much of my time is coding requiring restarts in testing.

    You'll read both camps here. It's one of the few areas where both are right and both are wrong.

    I can be persuaded to leave /fix and /opt alone but it will take a battle.
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.