mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:25:43 +00:00
[SETUPLIB] Upgrade display settings even if no hardware profile exists
This commit is contained in:
parent
a6bf77e7b9
commit
cdae92ed8c
1 changed files with 11 additions and 0 deletions
|
@ -894,6 +894,17 @@ ProcessDisplayRegistry(
|
||||||
Status = NtOpenKey(&KeyHandle,
|
Status = NtOpenKey(&KeyHandle,
|
||||||
KEY_SET_VALUE,
|
KEY_SET_VALUE,
|
||||||
&ObjectAttributes);
|
&ObjectAttributes);
|
||||||
|
if (Status == STATUS_OBJECT_NAME_NOT_FOUND)
|
||||||
|
{
|
||||||
|
/* Try without Hardware Profile part */
|
||||||
|
RtlStringCchPrintfW(RegPath, ARRAYSIZE(RegPath),
|
||||||
|
L"System\\CurrentControlSet\\Services\\%s\\Device0",
|
||||||
|
ServiceName);
|
||||||
|
RtlInitUnicodeString(&KeyName, RegPath);
|
||||||
|
Status = NtOpenKey(&KeyHandle,
|
||||||
|
KEY_SET_VALUE,
|
||||||
|
&ObjectAttributes);
|
||||||
|
}
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("NtOpenKey() failed (Status %lx)\n", Status);
|
DPRINT1("NtOpenKey() failed (Status %lx)\n", Status);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue