Strip the $$$PROTO.HIV bit from win2k SYSTEM and SOFTWARE hives.

This commit is contained in:
Huw D M Davies 2000-05-05 18:19:03 +00:00 committed by Alexandre Julliard
parent 2be78d412f
commit e5565ff049
1 changed files with 14 additions and 6 deletions

View File

@ -1534,13 +1534,21 @@ void SHELL_LoadRegistry( void )
* map HLM\System\ControlSet001 to HLM\System\CurrentControlSet
*/
strcpy(path, windir);
strncat(path, "\\system32\\config\\system", MAX_PATHNAME_LEN - strlen(path) - 1);
NativeRegLoadKey(HKEY_LOCAL_MACHINE, path, 0);
if (!RegCreateKeyA(HKEY_LOCAL_MACHINE, "SYSTEM", &hkey))
{
strcpy(path, windir);
strncat(path, "\\system32\\config\\system", MAX_PATHNAME_LEN - strlen(path) - 1);
NativeRegLoadKey(hkey, path, 1);
RegCloseKey(hkey);
}
strcpy(path, windir);
strncat(path, "\\system32\\config\\software", MAX_PATHNAME_LEN - strlen(path) - 1);
NativeRegLoadKey(HKEY_LOCAL_MACHINE, path, 0);
if (!RegCreateKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE", &hkey))
{
strcpy(path, windir);
strncat(path, "\\system32\\config\\software", MAX_PATHNAME_LEN - strlen(path) - 1);
NativeRegLoadKey(hkey, path, 1);
RegCloseKey(hkey);
}
strcpy(path, windir);
strncat(path, "\\system32\\config\\sam", MAX_PATHNAME_LEN - strlen(path) - 1);