registry backup

Hello again!
I can’t find any info at all about how create a registry backup from within my app.
Anybody have any ideas?

You can use a shell to invoke the reg export and reg import commands:

[code] Dim sh As New Shell
Dim file As FolderItem = SpecialFolder.Desktop.Child(“export.reg”)

sh.Execute("reg export HKEY_CURRENT_USER\Software\Xojo " + file.ShellPath) // export

sh.Execute("reg import " + file.ShellPath) // import[/code]

Thanks Andrew…but how do backup the entire registry?

You can use reg save and reg restore (instead of reg export and reg import) on the root of each hive you want to have backups of. Though, unless you’re writing a backup utility, backing up the entire registry seems like a drastic step. If you need to be able to restore the registry to just before doing something dangerous then I’d suggest creating a System Restore point.