I have a problem. I execute the code like below. after that I looked at the regedit file, the “test.reg” file didnt add. what do you think about the problem
content of the regedit file is :
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Wow6432Node\efe]
"key1"="value"
"key2"="value2"
the code is :
static void Main()
{
Process regeditProcess = Process.Start("regedit.exe", "/s " + @"D:\Projects\efe\efe\bin\Debug\test.reg");
regeditProcess.WaitForExit();
Console.WriteLine("Press any key to continue.");
Console.ReadKey();
}
thanks for your advice…
If you have administrative rights this should work if not you could try to create registry keys from c# directly :
I typed code from the head so maybe you would have to make some changes. And for this you need to have administrative rights on your application also.