Is it possible to specify a subkey when using RegSaveKeyEx?

时间:2019-04-16 22:06:54

标签: c++ windows file export registry

I've recently started learning to code and I'm trying to create a c++ console application that modifies Windows Registry in various ways (Yes, I'm trying to run before I can walk). I work with HKCU only, don't need HKLM.

I am able to open/close registry keys, create keys and values just fine. Now my issues is with trying to export a key to a file.

I've been looking into RegSaveKeyEx from Microsoft site: https://docs.microsoft.com/en-us/windows/desktop/api/winreg/nf-winreg-regsavekeyexa and it does not appear to have a subkey parameter.

For example RegCreateKeyEx has lpSubKey. Does that mean we are unable to export a specific key and have to export the entire HKEY_CURRENT_USER root?

Am I missing something, or will I just have to use ShellExecute() with cmd.exe and reg.exe?

0 个答案:

没有答案