https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6f389a35dbf7b8731f0e3…
commit 6f389a35dbf7b8731f0e3286eeda0d375ad170ea
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Sun Dec 20 18:21:27 2020 +0300
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Wed Jan 27 05:15:15 2021 +0300
[SETUPLIB] Add a workaround for installing from USB drives
---
base/setup/lib/setuplib.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/base/setup/lib/setuplib.c b/base/setup/lib/setuplib.c
index 0c3590e38e4..1ee70e6216a 100644
--- a/base/setup/lib/setuplib.c
+++ b/base/setup/lib/setuplib.c
@@ -410,6 +410,8 @@ GetSourcePaths(
ULONG BufferSize;
PWCHAR Ptr;
+ // FIXME: commented out to allow installation from USB
+#if 0
/* Determine the installation source path via the full path of the installer */
RtlInitEmptyUnicodeString(InstallSourcePath,
(PWSTR)((ULONG_PTR)ImageFileBuffer + sizeof(UNICODE_STRING)),
@@ -433,7 +435,7 @@ GetSourcePaths(
if (Ptr)
*Ptr = UNICODE_NULL;
InstallSourcePath->Length = wcslen(InstallSourcePath->Buffer) * sizeof(WCHAR);
-
+#endif
/*
* Now resolve the full path to \SystemRoot. In case it prefixes
@@ -478,7 +480,8 @@ GetSourcePaths(
return Status; // Unexpected error
/* Check whether the resolved \SystemRoot is a prefix of the image file path */
- if (RtlPrefixUnicodeString(&SystemRootPath, InstallSourcePath, TRUE))
+ // FIXME: commented out to allow installation from USB
+ // if (RtlPrefixUnicodeString(&SystemRootPath, InstallSourcePath, TRUE))
{
/* Yes it is, so we use instead SystemRoot as the installation source path */
InstallSourcePath = &SystemRootPath;
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e468da06be519d8d8a5e5…
commit e468da06be519d8d8a5e5475bfa17af7d278ab45
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Thu Dec 10 03:13:27 2020 +0300
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Wed Jan 27 05:15:14 2021 +0300
[SETUPAPI] Set the CONFIGFLAG_FAILEDINSTALL flag in SetupDiInstallDevice
The code follows the comment now. The fix may be wrong, but DNF_DISABLED
is a kernel flag and should definitely not be used in a dll.
---
dll/win32/setupapi/devinst.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dll/win32/setupapi/devinst.c b/dll/win32/setupapi/devinst.c
index fef929d6ef8..167d8062c98 100644
--- a/dll/win32/setupapi/devinst.c
+++ b/dll/win32/setupapi/devinst.c
@@ -3410,7 +3410,7 @@ BOOL WINAPI IntSetupDiSetDeviceRegistryPropertyAW(
hKey, PropertyMap[Property].nameA, 0,
PropertyMap[Property].regType, PropertyBuffer,
PropertyBufferSize);
- }
+ }
else
{
l = RegSetValueExW(
@@ -5435,7 +5435,7 @@ SetupDiInstallDevice(
SetLastError(ERROR_GEN_FAILURE);
goto cleanup;
}
- ConfigFlags |= DNF_DISABLED;
+ ConfigFlags |= CONFIGFLAG_FAILEDINSTALL;
Result = SetupDiSetDeviceRegistryPropertyW(
DeviceInfoSet,
DeviceInfoData,