Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Unattended registry backup in Windows XP Home or Pro

Mar 2, 2004 10:41AM PST

I want to do an unattended Registry backup in Windows XP Home SP1 and Pro using some commercial software, without having to go into the Registry Editor and manually exporting.

What are the file names and where is the information stored for the registry?

Thanks

Discussion is locked

- Collapse -
Re:Unattended registry backup in Windows XP Home or Pro
Mar 2, 2004 10:59AM PST

System Restore is already doing this, but you can use REGEDIT in a BATCH FILE to do this too.

Open the command window. Read http://www.ss64.com/nt/regedit.html
Now schedule what you want.

" REGEDIT

Import, export or delete registry settings from a text (.REG) file

syntax
Export the Registry (all HKLM plus current user)
REGEDIT /E pathname

Export part of the Registry
REGEDIT /E pathname "RegPath"

Import a reg script
REGEDIT pathname

Silent import
REGEDIT /S pathname

Start the regedit GUI
REGEDIT

key
/E : Export

/S : Silent Import

How to add keys and values from the registry:

Create a text file like this:

REGEDIT4
[HKEY_CURRENT_USER\SomeKey]
"SomeStringValue"="Hello"

When double clicking this .reg file the key and value will be added.
Alternatively run REGEDIT MYKEY.REG from the command line.

How to delete keys and values from the registry:

Create a reg file like this, notice the hyphen inside the first bracket

REGEDIT4
[-HKEY_CURRENT_USER\SomeKey]

When double clicking this .reg file the key "SomeKey" will be deleted along with all string, binary or Dword values in that key.

If you want to just delete values leaving the key in place, set the value you want to delete = to a hyphen
e.g.

REGEDIT4
[HKEY_CURRENT_USER\SomeKey]
"SomeStringValue"=-

Again double clicking this .reg file will delete the values specified - or you can use REGEDIT /s MyDeleteScript.REG.

Windows XP Registry files.
Under Windows NT all registry scripts start with:
REGEDIT4

Under 2K and XP this first line changes to:
Windows Registry Editor Version 5.00

To be sure that a .REG script will run under any version of Windows use the earlier syntax: REGEDIT4.

Compare the Registry of two machines

Windiff is your friend, this simple GUI utility from the resource kit will list all the differences.

Comments
Within a registry file, comments can be preceded by "; "
e.g.
;
; Turn the NUMLOCK on at login
;
[HKEY_CURRENT_USER\Control Panel\Keyboard]
"InitialKeyboardIndicators"="2"

Related commands:

REGEDT32.EXE - Edit the registry including Security and Auditing Options (NT 4)
REG - Read, Set or Delete registry keys and values
SET - Display, set, or remove Windows NT environment variables
SETX - Set environment variables permanently
Dureg - Registry Size Estimator. (Win 2K ResKit)"

Bob

- Collapse -
Re:Unattended registry backup in Windows XP Home or Pro
Mar 2, 2004 10:10PM PST

1. The article [Q309531] describes how to gain access to the System Volume Information folder that is a hidden system folder which the System Restore tool uses to store information and restore points and that exists for each hard-disk partition. This folder contains one or more _restore {GUID} folders such as _restore{87BD3667-3246-476B-923F-F86E30B3E7F8}. There may be one or more folders starting with RPx under this folder which are restore points. In addition, this articles explains that you can also use the command-line Cacls tool to display or modify file or folder access control lists (ACLs).

2. Check the information in "Use System Restore for Problems."

- Collapse -
Re:Unattended registry backup in Windows XP Home or Pro
Mar 3, 2004 7:34AM PST

I used LifeSaver program. This program has an option like automatic daily backup, weekly backup... All backup files will be compressed to save spaces and very easy to use. You can also restore the registry outside Windows thru floppy disk.

Regards,