c++ - How to use the RegLoadKey function to load the NTUSER.DAT file from the Default User? -
i thought use regloadkey load ntuser.dat file located in c:\users\default folder using code:
hkey hkey = hkey_local_machine; lpctstr lpsubkey = l"software\\load"; lpctstr lpfile = l"c:\\users\\default\\ntuser"; long r=regloadkey(hkey, lpsubkey, lpfile);
it did not work. can tell me how have use function load ntuser.dat file hklm\software\load sub-key?
thanks!
as @xearinox mentioned need privilages (se_backup_name
, se_restore_name
)
also must load ntuser.dat
, otherwise create new registry hive. , lpsubkey
can first level after hkey
.
so should set privilages , load this:
long ret = regloadkey(hkey_local_machine, l"load", l"c:\\users\\default\\ntuser.dat");
Comments
Post a Comment