Board index » Visual Studio » Problems saving HKLM
|
spribob
|
Problems saving HKLM
Visual Studio178
Hi there, I am trying to save the reg keys into a file: HKEY_CLASSES_ROOT HKEY_CURRENT_CONFIG HKEY_CURRENT_USER HKEY_LOCAL_MACHINE HKEY_USERS My program has both "SeBackupPrivilege" and "SeRestorePrivilege". I am using the RegSaveKey API. The program succesfully stores these: HKEY_CLASSES_ROOT HKEY_CURRENT_CONFIG HKEY_CURRENT_USER The machine does not store these: HKEY_LOCAL_MACHINE HKEY_USERS Error ("Access is denied"). Can someone tell me how to save the HKLM amd HKU? This probably what the problem is: msdn.microsoft.com/library/default.asp RegSaveKey takes a "handle is returned by the RegCreateKeyEx or RegOpenKeyEx function, or it can be one of the following predefined keys: HKEY_CLASSES_ROOT HKEY_CURRENT_CONFIG HKEY_CURRENT_USER" Now my guess HKLM is in some sense built in and hence I am running into this problem. Can you suggest a solution for this problem? How can I dump HKLM into a file? The only solution I see to look deeper into the registry and potentially do a registry traversal. thanks regards, --Sudhakar. - |
