mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 11:56:45 +00:00
[SETUPLIB][USETUP] Move the registry-update procedure into setuplib.
- It can therefore be also used by the 1st-stage GUI setup. - Rename some function parameters to clarify what they should be. Based on: svn path=/branches/setup_improvements/; revision=75750
This commit is contained in:
parent
dae658088a
commit
6c2d3dee04
7 changed files with 332 additions and 236 deletions
|
@ -133,7 +133,7 @@ CreateNestedKey(PHANDLE KeyHandle,
|
|||
*/
|
||||
NTSTATUS
|
||||
CreateRegistryFile(
|
||||
IN PUNICODE_STRING InstallPath,
|
||||
IN PUNICODE_STRING NtSystemRoot,
|
||||
IN PCWSTR RegistryKey,
|
||||
IN BOOLEAN IsHiveNew,
|
||||
IN HANDLE ProtoKeyHandle
|
||||
|
@ -156,7 +156,7 @@ CreateRegistryFile(
|
|||
WCHAR PathBuffer2[MAX_PATH];
|
||||
|
||||
CombinePaths(PathBuffer, ARRAYSIZE(PathBuffer), 3,
|
||||
InstallPath->Buffer, L"System32\\config", RegistryKey);
|
||||
NtSystemRoot->Buffer, L"System32\\config", RegistryKey);
|
||||
|
||||
Extension = Extensions[IsHiveNew ? 0 : 1];
|
||||
|
||||
|
@ -212,7 +212,7 @@ CreateRegistryFile(
|
|||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&FileName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
NULL, // Could have been InstallPath, etc...
|
||||
NULL, // Could have been NtSystemRoot, etc...
|
||||
NULL); // Descriptor
|
||||
|
||||
Status = NtCreateFile(&FileHandle,
|
||||
|
@ -320,7 +320,7 @@ ConnectRegistry(
|
|||
IN HKEY RootKey OPTIONAL,
|
||||
IN PCWSTR RegMountPoint,
|
||||
// IN HANDLE RootDirectory OPTIONAL,
|
||||
IN PUNICODE_STRING InstallPath,
|
||||
IN PUNICODE_STRING NtSystemRoot,
|
||||
IN PCWSTR RegistryKey
|
||||
/*
|
||||
IN PUCHAR Descriptor,
|
||||
|
@ -341,7 +341,7 @@ ConnectRegistry(
|
|||
NULL); // Descriptor
|
||||
|
||||
CombinePaths(PathBuffer, ARRAYSIZE(PathBuffer), 3,
|
||||
InstallPath->Buffer, L"System32\\config", RegistryKey);
|
||||
NtSystemRoot->Buffer, L"System32\\config", RegistryKey);
|
||||
RtlInitUnicodeString(&FileName, PathBuffer);
|
||||
InitializeObjectAttributes(&FileObjectAttributes,
|
||||
&FileName,
|
||||
|
@ -383,7 +383,7 @@ NTSTATUS
|
|||
VerifyRegistryHive(
|
||||
// IN HKEY RootKey OPTIONAL,
|
||||
// // IN HANDLE RootDirectory OPTIONAL,
|
||||
IN PUNICODE_STRING InstallPath,
|
||||
IN PUNICODE_STRING NtSystemRoot,
|
||||
IN PCWSTR RegistryKey /* ,
|
||||
IN PCWSTR RegMountPoint */)
|
||||
{
|
||||
|
@ -392,7 +392,7 @@ VerifyRegistryHive(
|
|||
/* Try to mount the specified registry hive */
|
||||
Status = ConnectRegistry(NULL,
|
||||
L"\\Registry\\Machine\\USetup_VerifyHive",
|
||||
InstallPath,
|
||||
NtSystemRoot,
|
||||
RegistryKey
|
||||
/* NULL, 0 */);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue