

Printers manager to save and restore users' printer configurations in the OS migration process, for example.Profiles manager for only important parts of the registry that must be saved and restored and not necessarily the whole user registry.These are some situations where the article's attached utility program can be used: As a consequence, the tool presented in this article should be used by an administrator account. This article shows how to save and restore registry keys using the Windows API functions: RegSaveKey and RegRestoreKey respectively and provides a tool to achieve these two tasks.Īccording to MSDN, these two API functions require two privileges, namely SE_BACKUP_NAME ( SeBackupPrivilege) and/or SE_RESTORE_NAME ( SeRestorePrivilege) even if the current process token has administrator rights. If some error occurs, the error code and description are printed in the DOS console, but the program still returns 1 if success and 0 otherwise.įirst of all, I apologize for my bad English.

RegsaveRestore /s hkcu "" c:\cu.dat RegsaveRestore /r hkcu "" c:\cu.dat
