+ NtfsGlobalData->EnableWriteSupport = FALSE;
+
+ // Read registry to determine if write support should be enabled
+ InitializeObjectAttributes(&Attributes,
+ RegistryPath,
+ OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
+ NULL,
+ NULL);
+
+ Status = ZwOpenKey(&DriverKey, KEY_READ, &Attributes);
+ if (NT_SUCCESS(Status))
+ {
+ UNICODE_STRING ValueName;
+ UCHAR Buffer[sizeof(KEY_VALUE_PARTIAL_INFORMATION) + sizeof(ULONG)];
+ PKEY_VALUE_PARTIAL_INFORMATION Value = (PKEY_VALUE_PARTIAL_INFORMATION)Buffer;
+ ULONG ValueLength = sizeof(Buffer);
+ ULONG ResultLength;
+
+ RtlInitUnicodeString(&ValueName, L"MyDataDoesNotMatterSoEnableExperimentalWriteSupportForEveryNTFSVolume");
+
+ Status = ZwQueryValueKey(DriverKey,
+ &ValueName,
+ KeyValuePartialInformation,
+ Value,
+ ValueLength,
+ &ResultLength);
+
+ if (NT_SUCCESS(Status) && Value->Data[0] == TRUE)
+ {
+ DPRINT1("\tEnabling write support on ALL NTFS volumes!\n");
+ NtfsGlobalData->EnableWriteSupport = TRUE;
+ }
+
+ ZwClose(DriverKey);
+ }
+