mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 17:56:00 +00:00
[SETUPLIB] Register the \DosDevices\?: drive letter from installation time in the correct SYSTEM\MountedDevices registry key, i.e. the one of the ReactOS being currently installed.
CORE-15575 However I now hit a separate bug (see the report) that still prevent the drive letter to be correctly assigned at reboot.
This commit is contained in:
parent
5e14dbd648
commit
51cb3cc6b2
1 changed files with 10 additions and 10 deletions
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#include "partlist.h"
|
#include "partlist.h"
|
||||||
#include "fsutil.h"
|
#include "fsutil.h"
|
||||||
|
#include "registry.h"
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
@ -3972,13 +3973,13 @@ SetMountedDeviceValue(
|
||||||
IN ULONG Signature,
|
IN ULONG Signature,
|
||||||
IN LARGE_INTEGER StartingOffset)
|
IN LARGE_INTEGER StartingOffset)
|
||||||
{
|
{
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
|
||||||
WCHAR ValueNameBuffer[16];
|
|
||||||
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\SYSTEM\\MountedDevices");
|
|
||||||
UNICODE_STRING ValueName;
|
|
||||||
REG_DISK_MOUNT_INFO MountInfo;
|
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
|
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"SYSTEM\\MountedDevices");
|
||||||
|
UNICODE_STRING ValueName;
|
||||||
|
WCHAR ValueNameBuffer[16];
|
||||||
HANDLE KeyHandle;
|
HANDLE KeyHandle;
|
||||||
|
REG_DISK_MOUNT_INFO MountInfo;
|
||||||
|
|
||||||
RtlStringCchPrintfW(ValueNameBuffer, ARRAYSIZE(ValueNameBuffer),
|
RtlStringCchPrintfW(ValueNameBuffer, ARRAYSIZE(ValueNameBuffer),
|
||||||
L"\\DosDevices\\%c:", Letter);
|
L"\\DosDevices\\%c:", Letter);
|
||||||
|
@ -3987,7 +3988,7 @@ SetMountedDeviceValue(
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
&KeyName,
|
&KeyName,
|
||||||
OBJ_CASE_INSENSITIVE,
|
OBJ_CASE_INSENSITIVE,
|
||||||
NULL,
|
GetRootKeyByPredefKey(HKEY_LOCAL_MACHINE, NULL),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
Status = NtOpenKey(&KeyHandle,
|
Status = NtOpenKey(&KeyHandle,
|
||||||
|
@ -4003,7 +4004,6 @@ SetMountedDeviceValue(
|
||||||
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 %lx)\n", Status);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue