9
Answers

Execute .reg file?

Moritz Gutwein

Moritz Gutwein

10y
1.3k
1

Dear friends,

 i'd like to  execute a reg file from the desktop. With this file, i write some informations to the registry. I know, i can write directly to the registry with:

 

key.SetValue("Example");

 
But afterwards, if i want to change some informations, i always need to change to whole program. So i tried:
 

Process regeditProcess = Process.Start("regedit.exe", @" /S /r C:\Users\example\Desktop\oeminfo.reg");

It starts correctly and asks for permission but when i accepted, nothing happens to the registry. I think there is some problem with the 64 bit Version, because there was the same issue with the RegistryKey method.
 
Sorry for potential mistakes.
 
lg Moritz 

Answers (9)