C# winforms - How can I import a reg
file into the registry? The following code is displaying a confirmation box to the user (yes/no).
Process regeditProcess = Process.Start("key.reg", "/S /q"); // not working
regeditProcess.WaitForExit();
Send the file as a parameter to regedit.exe
:
Process regeditProcess = Process.Start("regedit.exe", "/s key.reg");
regeditProcess.WaitForExit();