mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 13:45:58 +00:00
Redirect registry keys from 'CurrentControlSet' to 'ControlSet001' without using registry links.
svn path=/trunk/; revision=26980
This commit is contained in:
parent
d6f3effcff
commit
d9314287a7
|
@ -132,8 +132,9 @@ RegpOpenOrCreateKey(
|
||||||
else
|
else
|
||||||
RtlInitUnicodeString(&KeyString, LocalKeyName);
|
RtlInitUnicodeString(&KeyString, LocalKeyName);
|
||||||
|
|
||||||
while (ParentKey->DataType == REG_LINK)
|
/* Redirect from 'CurrentControlSet' to 'ControlSet001' */
|
||||||
ParentKey = ParentKey->LinkedKey;
|
if (!wcsncmp(LocalKeyName, L"CurrentControlSet", 17))
|
||||||
|
RtlInitUnicodeString(&KeyString, L"ControlSet001");
|
||||||
|
|
||||||
/* Check subkey in memory structure */
|
/* Check subkey in memory structure */
|
||||||
Ptr = ParentKey->SubKeyList.Flink;
|
Ptr = ParentKey->SubKeyList.Flink;
|
||||||
|
@ -667,16 +668,11 @@ RegInitializeRegistry(VOID)
|
||||||
&SystemHive,
|
&SystemHive,
|
||||||
L"Registry\\Machine\\SYSTEM");
|
L"Registry\\Machine\\SYSTEM");
|
||||||
|
|
||||||
/* Create link 'CurrentControlSet' --> 'ControlSet001' */
|
/* Create 'ControlSet001' key */
|
||||||
RegCreateKeyW(
|
RegCreateKeyW(
|
||||||
NULL,
|
NULL,
|
||||||
L"Registry\\Machine\\SYSTEM\\ControlSet001",
|
L"Registry\\Machine\\SYSTEM\\ControlSet001",
|
||||||
&ControlSetKey);
|
&ControlSetKey);
|
||||||
RegCreateKeyW(
|
|
||||||
NULL,
|
|
||||||
L"Registry\\Machine\\SYSTEM\\CurrentControlSet",
|
|
||||||
&LinkKey);
|
|
||||||
RegSetValueExW(LinkKey, NULL, 0, REG_LINK, (PCHAR)&ControlSetKey, sizeof(PVOID));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue