Registry Backup
Results 1 to 6 of 6

Thread: Registry Backup

  1. #1
    Registered User
    Join Date
    Dec 2000
    Location
    UK
    Posts
    253

    Smile Registry Backup

    I have made a very simple batch file which, when run will copy all *.dat files in the Windows directory to a folder on the hard disk.

    If you want a copy please send an email to [email protected]

  2. #2
    Registered User
    Join Date
    Jan 1999
    Location
    Kelowna, B.C. Canada
    Posts
    647

    Post

    Here's one I wrote quite awhile ago. Backs up more than just the reg.
    There's also a restore.bat to (duh) restore the backups made with this .bat
    <font color="Red">
    @echo off
    cls
    echo Jim (reboot) Delong's backup.bat, a Win9x/ME backup tool.
    echo ---------------------------------------------------------
    echo Copyright (c) 2000 Jim Delong
    echo http://members.cnx.net/reboot
    echo version 1.2 October 4/2000
    rem Version 1.2 Now backs up Netscape bookmarks
    echo ---------------------------------------------------------
    echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    echo Important!!!!!!!!!
    echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    echo You MUST run this from the root directory of your
    echo hard drive. If this file is NOT saved in root C:\
    echo you MUST hit ctrl-c now and save it there!
    echo DO NOT run this from any other folder or the desktop,
    echo it will not work correctly!
    echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    echo.
    echo If you have NOT saved this file in the root C:\ folder,
    echo hit ctrl-c now, otherwise
    pause
    echo Use Notepad to view this file's contents before running!
    echo Who knows, you may learn a little about DOS.
    echo Only you can determine if the file contents and
    echo structure are OK to run on *your specific* setup.
    echo -----------
    :: This file is offered as-is and without warranty of any kind.
    :: This file may redistributed as long as all header information
    :: is retained in the final file.
    echo This file assumes your Windows folder is at c:\Windows
    echo If it isn't, you must change the path below to your Windows folder.
    echo This file backs up the c:\windows\favorites folder, the
    echo c:\my documents folder, Netscape bookmarks, and the two
    echo files that make up the Windows registry.
    echo (user.dat and system.dat)
    echo.
    echo Bonus! You may now run this file within windows!
    echo No need to restart in DOS mode.
    echo ---------------------------------------------------------
    echo Hit ctrl-c to abort or
    pause
    cls
    echo.
    echo Making a backup folder. This folder is called "backups".
    echo Please stop now and edit this .bat file
    echo if you wish to change the path or name.
    echo Hit ctrl-c to abort or
    pause
    rem --------------------------------------------
    echo Making backup folders
    echo.
    rem --------------------------------------------
    md backups
    cd backups
    md faves
    md mydocs
    md registry
    rem add any other subdirectories here.
    rem Be sure to use the correct syntax, eg. md foldername
    rem ---------------------------------------------
    echo Add as many subdirectories as you like above.
    echo This file only makes backups of your favorites folder
    echo your My Documents folder, and the two registry files.
    echo.
    rem ---------------------------------------------
    cd\
    echo.
    echo Now backing up your favorites and other folders.
    echo.
    rem --------------------------------------------------
    echo This now backs up IE favorites, and INetscape bookmarks.
    echo.
    pause
    rem ----------------------------------------------------------------------------
    rem If you added more folders above, you MUST add the appropriate path below.
    rem ----------------------------------------------------------------------------
    rem Add any subsequent backup pathnames here. Be sure to use the syntax:
    rem echo Backing up Favorites.
    rem xcopy32 c:folderpath\foldername\*.* c:\backups\foldername /y /s
    rem echo.
    rem echo Successfully backed up your Favorites folder.
    rem ---------------------------------------------------------------------------------
    echo Backing up Favorites.
    xcopy32 c:windows\favori~1\*.* c:\backups\faves /y /s
    echo If you do not have Internet Explorer this may give an error. Ignore it.
    echo.
    echo Successfully backed up your Favorites folder.
    echo.
    echo Now backing up Netscape bookmarks.
    echo If you don't have Netscape, this will give an error. Ignore it.
    xcopy32 C:\Progra~1\Netscape\Commun~1\Program\defaults\boo kmark.htm c:\backups\faves /y /s
    echo Successfully backed up your Netscape bookmarks.
    echo.
    echo I will now back up your My Documents folder.
    echo Hit ctrl-c if you wish to quit now, otherwise
    pause
    echo Backing up My Documents
    xcopy32 c:\mydocu~1\*.* c:\backups\mydocs /y /s
    echo.
    echo Successfully backed up your My Documents folder.
    echo I will now backup your registry files.
    echo Hit ctrl-c if you wish to quit now, otherwise
    pause
    echo.
    echo Backing up the registry.
    cd windows
    attrib -h -r -s -a user.dat
    attrib -h -r -s -a system.dat
    attrib -h -r -s -a win.ini
    attrib -h -r -s -a system.ini
    xcopy32 c:\windows\user.dat c:\backups\registry\ /y /s
    xcopy32 c:\windows\system.dat c:\backups\registry\ /y /s
    xcopy32 c:\windows\win.ini c:\backups\registry\ /y /s
    xcopy32 c:\windows\system.ini c:\backups\registry\ /y /s
    echo.
    echo Successfully backed up your Registry.
    rem Don't worry about resetting the attributes of the registry files.
    rem Windows will do that automatically upon your next restart.
    pause
    echo.
    echo Successful backup!
    echo.
    echo It is recommended you copy the contents of the c:\backups folder somewhere
    echo for safe keeping.
    echo You may close this window now.
    </font>

  3. #3
    Registered User
    Join Date
    Jun 2001
    Location
    LocalHost
    Posts
    762

    Post

    ahhaha for how all those lines of code ill make a vb program and its a gui and which will have less line of code lol.


    But good work <IMG SRC="smilies/smile.gif" border="0">

  4. #4
    Registered User
    Join Date
    Jan 1999
    Location
    Kelowna, B.C. Canada
    Posts
    647

    Post

    If you look, there's only about 10 lines of code, the rest is instructions, prompts, text...
    I wrote it that way so even a scared newbie may be able to run it without too much trepidation.

  5. #5
    Registered User
    Join Date
    Aug 1999
    Location
    near the backdoor to hell
    Posts
    804

    Post

    Originally posted by reboot:
    <STRONG>If you look, there's only about 10 lines of code, the rest is instructions, prompts, text...
    I wrote it that way so even a scared newbie may be able to run it without too much trepidation.</STRONG>
    why not use the "cd \" to start with? then you wouldn't have to worry about it being ran from the root of c:

  6. #6
    Registered User
    Join Date
    Jan 1999
    Location
    Kelowna, B.C. Canada
    Posts
    647

    Post

    Because then the backups won't be saved in root C: and the restore.bat won't find any backups, unless the code is changed.
    Most newbies don't want to have to rewrite parts of a .bat to get it to work right.
    I tried it both ways, and determined that this was the easiest/safest way (most idiot proof?).

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •