Hi All,
How can i export windows registry using C#.
pls
Printable View
Hi All,
How can i export windows registry using C#.
pls
Hi, it is a well known secret (?) that you can export registry keys from the command line prompt by typing
regedit /e outputfile "regkey"
Apparently it is important to surround regkey with ".
So, if you can use the command line prompt to export registry keys, you can use C# to do it. How? With System.Diagnostics.Process.
Note: I'm not sure if this is valid for Windows 95/98/Me though.Code:System.Diagnostics.Process RegistryExportProcess = new System.Diagnostics.Process();
RegistryExportProcess.StartInfo.Arguments =
"/e c:\\regexp.reg \"HKEY_CURRENT_USER\\Software\\Microsoft\\HyperTerminal\"";
RegistryExportProcess.StartInfo.FileName = "regedit";
RegistryExportProcess.Start();
HTH!