[RESOLVED] Backup/Export Registry Key
Hello all,
I am trying to find a way to backup/export a Registry Key branch (including subkeys) in my program. I have searched google and have not found anything that seems to make much sense to me.
Can anyone provide me direction on how I can do this?
Thanks!:bigyello:
Re: Backup/Export Registry Key
You can look at using regedit /e (e switch) or you can go for an 'existing' sample.
http://www.codeproject.com/KB/XML/registryxml.aspx
Re: Backup/Export Registry Key
I was actually able to get this to work with the method that you provided.
Code:
string Command = ("/C regedit.exe /e " + @"""" + ModernTechBU + @"\CurrentUser.Reg" + @"""" + CurrentUser);
if (Directory.Exists(ModernTechBU)==false)
{
Directory.CreateDirectory(ModernTechBU);
}
System.Diagnostics.Process.Start("CMD.exe", Command);
RegCall.Close();
Thanks!
Re: [RESOLVED] Backup/Export Registry Key