Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 653 of file registry.c.
Referenced by RegistryPage().
{ OBJECT_ATTRIBUTES ObjectAttributes; UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\HARDWARE"); UNICODE_STRING ValueName = RTL_CONSTANT_STRING(L"InstallPath"); HANDLE KeyHandle; NTSTATUS Status; /* Create the 'secret' InstallPath key */ InitializeObjectAttributes (&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, NULL, NULL); Status = NtOpenKey (&KeyHandle, KEY_ALL_ACCESS, &ObjectAttributes); if (!NT_SUCCESS(Status)) { DPRINT1("NtOpenKey() failed (Status %lx)\n", Status); return FALSE; } Status = NtSetValueKey (KeyHandle, &ValueName, 0, REG_SZ, (PVOID)InstallPath->Buffer, InstallPath->Length + sizeof(WCHAR)); NtClose(KeyHandle); if (!NT_SUCCESS(Status)) { DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status); return FALSE; } return TRUE; }