import .reg files using win32 or other libraries

前端 未结 2 2004
遇见更好的自我
遇见更好的自我 2021-01-24 13:42

My question is a bit related to this one but it\'s not what I was aiming for:

programmatically merge .reg file into win32 registry

What I want to do is to creat

相关标签:
2条回答
  • 2021-01-24 14:26

    Just been looking for this myself, and the answer is RegLoadKey()

    https://msdn.microsoft.com/en-us/library/windows/desktop/ms724889%28v=vs.85%29.aspx

    0 讨论(0)
  • 2021-01-24 14:35

    Since regedit.exe created the reg file in the first place, I'm not really sure why you wouldn't also want it to do the import.

    One other option would be to parse the reg file and then convert the parsed information into direct calls to the RegCreateKey, RegSetValue Win32 API functions, but I suspect that would be a fair amount of coding effort.

    0 讨论(0)
提交回复
热议问题