Is there API function that exports registry key?
Printable View
Is there API function that exports registry key?
One way to do it is simply use ::CreateProcess(..) with regedit.exe command lines for export, here is a sample:
CheersCode:char szRegCommand[MAX_PATH];
::sprintf(szRegCommand,"regedit.exe /e:a \"c:\\Exported.reg\" \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\"");
STARTUPINFO SI={0};
PROCESS_INFORMATION PI={0};
::CreateProcess(0,szRegCommand,0,NULL,false,CREATE_DEFAULT_ERROR_MODE,NULL,0,&SI,&PI);
Have you tried using RegSaveKeyEx?
Looks promising somehow it missed that api :blush:Quote:
Originally Posted by Mike Harnad
Cheers