I'm trying to save the Hive Registry File called HKLM\SOFTWARE
from a C# application.
When I run the the following command (from CMD) REG SAVE HKLM\SOFTWARE C:\TEST
it give me a file with a size of about 90MB.
So, I expected that by running this command through the Process and ProcessStartInfo class in a C# Console Application, it would give me the same result. NO. It produces a file of about 8MB, obviously with less data!
Here is the C# code:
ProcessStartInfo start = new ProcessStartInfo("REG", "SAVE HKLM\SOFTWARE C:\TEST")
{
UseShellExecute = false,
RedirectStandardOutput = false,
RedirectStandardError = false,
CreateNoWindow = true,
};
Process.Start(start).WaitForExit();
Why it gives me a smaller file? How can I solve this?
Thanks in advance!