From 6f389a35dbf7b8731f0e3286eeda0d375ad170ea Mon Sep 17 00:00:00 2001 From: Victor Perevertkin Date: Sun, 20 Dec 2020 18:21:27 +0300 Subject: [PATCH] [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;