What\'s the best way to programmatically merge a .reg file into the registry? This is for unit testing; the .reg file is a test artifact which will be added then removed at
I looked into it by checking out my file associations.
It seems that a .reg file is just called as the first parameter to the regedit.exe
executable on Windows.
So you can just say regedit.exe "mytest.reg"
. What I'm not sure of is how to get rid of the dialog box that pops up that asks for your confirmation.