mirror of
https://github.com/reactos/reactos.git
synced 2024-10-24 23:11:33 +00:00
Use only NtCreateKey and better suited access rights.
svn path=/trunk/; revision=20448
This commit is contained in:
parent
8ac1adfd7d
commit
7d203ec76d
|
@ -109,24 +109,17 @@ static BOOL add_boot_rename_entry( LPCWSTR source, LPCWSTR dest, DWORD flags )
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
Status = NtOpenKey(&Reboot,
|
|
||||||
KEY_ALL_ACCESS,
|
|
||||||
&ObjectAttributes);
|
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
Status = NtCreateKey(&Reboot,
|
Status = NtCreateKey(&Reboot,
|
||||||
KEY_ALL_ACCESS,
|
KEY_QUERY_VALUE | KEY_SET_VALUE,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
REG_OPTION_NON_VOLATILE,
|
REG_OPTION_NON_VOLATILE,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
|
DPRINT1("NtCreateKey() failed (Status 0x%lx)\n", Status);
|
||||||
RtlFreeUnicodeString( &source_name );
|
RtlFreeUnicodeString( &source_name );
|
||||||
RtlFreeUnicodeString( &dest_name );
|
RtlFreeUnicodeString( &dest_name );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue