programmatically merge .reg file into win32 registry

后端 未结 5 2325
猫巷女王i
猫巷女王i 2021-01-18 21:36

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

5条回答
  •  一个人的身影
    2021-01-18 21:53

    Use the Win32 API function ShellExecute() or ShellExecuteEx(). If the comment is 'open' it should merge the .reg file. I haven't tested it, but it should work.

提交回复
热议问题