Author: hbelusca Date: Wed May 24 16:37:49 2017 New Revision: 74641
URL: http://svn.reactos.org/svn/reactos?rev=74641&view=rev Log: [USETUP]: Refactor the DoesFileExist() function so that it now looks closer to DoesPathExist() and use it almost everywhere. Adjust also its callers, adjust OpenAndMapFile() parameters. Related to that, simplify IsValidNTOSInstallation() parameters & introduce a IsValidNTOSInstallation_UStr that does the same but takes a UNICODE_STRING instead. Simplify CheckForValidPEAndVendor(). Now only exactly 5 calls use the "old" 'DoesFileExist' syntax, using a temporarily auxiliary function "DoesFileExist_2"...
Modified: branches/setup_improvements/base/setup/lib/filesup.c branches/setup_improvements/base/setup/lib/filesup.h branches/setup_improvements/base/setup/lib/osdetect.c branches/setup_improvements/base/setup/usetup/bootsup.c branches/setup_improvements/base/setup/usetup/interface/usetup.c
Modified: branches/setup_improvements/base/setup/lib/filesup.c URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/li... ============================================================================== --- branches/setup_improvements/base/setup/lib/filesup.c [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/lib/filesup.c [iso-8859-1] Wed May 24 16:37:49 2017 @@ -176,7 +176,7 @@ if (NT_SUCCESS(Status)) NtClose(FileHandle); else - DPRINT1("Failed to open directory %wZ, Status 0x%08lx\n", &Name, Status); + DPRINT1("Failed to open directory '%wZ', Status 0x%08lx\n", &Name, Status);
return NT_SUCCESS(Status); } @@ -184,21 +184,18 @@ BOOLEAN DoesFileExist( IN HANDLE RootDirectory OPTIONAL, - IN PCWSTR PathName OPTIONAL, - IN PCWSTR FileName) + IN PCWSTR PathNameToFile) { NTSTATUS Status; + UNICODE_STRING FileName; HANDLE FileHandle; OBJECT_ATTRIBUTES ObjectAttributes; IO_STATUS_BLOCK IoStatusBlock; - UNICODE_STRING Name; - WCHAR FullName[MAX_PATH]; - - CombinePaths(FullName, ARRAYSIZE(FullName), 2, PathName, FileName); - RtlInitUnicodeString(&Name, FullName); + + RtlInitUnicodeString(&FileName, PathNameToFile);
InitializeObjectAttributes(&ObjectAttributes, - &Name, + &FileName, OBJ_CASE_INSENSITIVE, RootDirectory, NULL); @@ -212,9 +209,20 @@ if (NT_SUCCESS(Status)) NtClose(FileHandle); else - DPRINT1("Failed to open file %wZ, Status 0x%08lx\n", &Name, Status); + DPRINT1("Failed to open file '%wZ', Status 0x%08lx\n", &FileName, Status);
return NT_SUCCESS(Status); +} + +// FIXME: DEPRECATED! HACKish function that needs to be deprecated! +BOOLEAN +DoesFileExist_2( + IN PCWSTR PathName OPTIONAL, + IN PCWSTR FileName) +{ + WCHAR FullName[MAX_PATH]; + CombinePaths(FullName, ARRAYSIZE(FullName), 2, PathName, FileName); + return DoesFileExist(NULL, FullName); }
/* @@ -320,26 +328,23 @@ NTSTATUS OpenAndMapFile( IN HANDLE RootDirectory OPTIONAL, - IN PCWSTR PathName OPTIONAL, - IN PCWSTR FileName, // OPTIONAL + IN PCWSTR PathNameToFile, OUT PHANDLE FileHandle, // IN OUT PHANDLE OPTIONAL OUT PHANDLE SectionHandle, OUT PVOID* BaseAddress, OUT PULONG FileSize OPTIONAL) { NTSTATUS Status; + UNICODE_STRING FileName; OBJECT_ATTRIBUTES ObjectAttributes; IO_STATUS_BLOCK IoStatusBlock; SIZE_T ViewSize; PVOID ViewBase; - UNICODE_STRING Name; - WCHAR FullName[MAX_PATH]; - - CombinePaths(FullName, ARRAYSIZE(FullName), 2, PathName, FileName); - RtlInitUnicodeString(&Name, FullName); + + RtlInitUnicodeString(&FileName, PathNameToFile);
InitializeObjectAttributes(&ObjectAttributes, - &Name, + &FileName, OBJ_CASE_INSENSITIVE, RootDirectory, NULL); @@ -355,7 +360,7 @@ FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to open file '%wZ', Status 0x%08lx\n", &Name, Status); + DPRINT1("Failed to open file '%wZ', Status 0x%08lx\n", &FileName, Status); return Status; }
@@ -377,7 +382,7 @@ }
if (FileInfo.EndOfFile.HighPart != 0) - DPRINT1("WARNING!! The file '%wZ' is too large!\n", &Name); + DPRINT1("WARNING!! The file '%wZ' is too large!\n", &FileName);
*FileSize = FileInfo.EndOfFile.LowPart;
@@ -396,7 +401,7 @@ *FileHandle); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to create a memory section for file '%wZ', Status 0x%08lx\n", &Name, Status); + DPRINT1("Failed to create a memory section for file '%wZ', Status 0x%08lx\n", &FileName, Status); NtClose(*FileHandle); *FileHandle = NULL; return Status; @@ -416,7 +421,7 @@ PAGE_READONLY); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to map a view for file %wZ, Status 0x%08lx\n", &Name, Status); + DPRINT1("Failed to map a view for file '%wZ', Status 0x%08lx\n", &FileName, Status); NtClose(*SectionHandle); *SectionHandle = NULL; NtClose(*FileHandle);
Modified: branches/setup_improvements/base/setup/lib/filesup.h URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/li... ============================================================================== --- branches/setup_improvements/base/setup/lib/filesup.h [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/lib/filesup.h [iso-8859-1] Wed May 24 16:37:49 2017 @@ -52,6 +52,11 @@ BOOLEAN DoesFileExist( IN HANDLE RootDirectory OPTIONAL, + IN PCWSTR PathNameToFile); + +// FIXME: DEPRECATED! HACKish function that needs to be deprecated! +BOOLEAN +DoesFileExist_2( IN PCWSTR PathName OPTIONAL, IN PCWSTR FileName);
@@ -65,8 +70,7 @@ NTSTATUS OpenAndMapFile( IN HANDLE RootDirectory OPTIONAL, - IN PCWSTR PathName OPTIONAL, - IN PCWSTR FileName, // OPTIONAL + IN PCWSTR PathNameToFile, OUT PHANDLE FileHandle, // IN OUT PHANDLE OPTIONAL OUT PHANDLE SectionHandle, OUT PVOID* BaseAddress,
Modified: branches/setup_improvements/base/setup/lib/osdetect.c URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/li... ============================================================================== --- branches/setup_improvements/base/setup/lib/osdetect.c [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/lib/osdetect.c [iso-8859-1] Wed May 24 16:37:49 2017 @@ -103,9 +103,12 @@
static BOOLEAN +IsValidNTOSInstallation_UStr( + IN PUNICODE_STRING SystemRootPath); + +/*static*/ BOOLEAN IsValidNTOSInstallation( - IN HANDLE SystemRootDirectory OPTIONAL, - IN PCWSTR SystemRoot OPTIONAL); + IN PCWSTR SystemRoot);
static PNTOS_INSTALLATION FindExistingNTOSInstall( @@ -140,9 +143,6 @@ PWCHAR SectionName, KeyData; UNICODE_STRING InstallName;
- HANDLE SystemRootDirectory; - OBJECT_ATTRIBUTES ObjectAttributes; - IO_STATUS_BLOCK IoStatusBlock; PNTOS_INSTALLATION NtOsInstall; UNICODE_STRING SystemRootPath; WCHAR SystemRoot[MAX_PATH]; @@ -262,25 +262,7 @@ /* Set SystemRootPath */ DPRINT1("FreeLdrEnumerateInstallations: SystemRootPath: '%wZ'\n", &SystemRootPath);
- /* Open SystemRootPath */ - InitializeObjectAttributes(&ObjectAttributes, - &SystemRootPath, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - Status = NtOpenFile(&SystemRootDirectory, - FILE_LIST_DIRECTORY | SYNCHRONIZE, - &ObjectAttributes, - &IoStatusBlock, - FILE_SHARE_READ | FILE_SHARE_WRITE, - FILE_SYNCHRONOUS_IO_NONALERT | FILE_DIRECTORY_FILE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to open SystemRoot '%wZ', Status 0x%08lx\n", &SystemRootPath, Status); - continue; - } - - if (IsValidNTOSInstallation(SystemRootDirectory, NULL)) + if (IsValidNTOSInstallation_UStr(&SystemRootPath)) { ULONG DiskNumber = 0, PartitionNumber = 0; PCWSTR PathComponent = NULL; @@ -320,8 +302,6 @@ DiskNumber, PartitionNumber, PartEntry, InstallNameW); } - - NtClose(SystemRootDirectory); } while (IniCacheFindNextValue(Iterator, &SectionName, &KeyData));
@@ -347,9 +327,6 @@ PWCHAR SectionName, KeyData; UNICODE_STRING InstallName;
- HANDLE SystemRootDirectory; - OBJECT_ATTRIBUTES ObjectAttributes; - IO_STATUS_BLOCK IoStatusBlock; PNTOS_INSTALLATION NtOsInstall; UNICODE_STRING SystemRootPath; WCHAR SystemRoot[MAX_PATH]; @@ -437,25 +414,7 @@ /* Set SystemRootPath */ DPRINT1("NtLdrEnumerateInstallations: SystemRootPath: '%wZ'\n", &SystemRootPath);
- /* Open SystemRootPath */ - InitializeObjectAttributes(&ObjectAttributes, - &SystemRootPath, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - Status = NtOpenFile(&SystemRootDirectory, - FILE_LIST_DIRECTORY | SYNCHRONIZE, - &ObjectAttributes, - &IoStatusBlock, - FILE_SHARE_READ | FILE_SHARE_WRITE, - FILE_SYNCHRONOUS_IO_NONALERT | FILE_DIRECTORY_FILE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to open SystemRoot '%wZ', Status 0x%08lx\n", &SystemRootPath, Status); - continue; - } - - if (IsValidNTOSInstallation(SystemRootDirectory, NULL)) + if (IsValidNTOSInstallation_UStr(&SystemRootPath)) { ULONG DiskNumber = 0, PartitionNumber = 0; PCWSTR PathComponent = NULL; @@ -495,8 +454,6 @@ DiskNumber, PartitionNumber, PartEntry, InstallNameW); } - - NtClose(SystemRootDirectory); } while (IniCacheFindNextValue(Iterator, &SectionName, &KeyData));
@@ -540,8 +497,7 @@ static BOOLEAN CheckForValidPEAndVendor( IN HANDLE RootDirectory OPTIONAL, - IN PCWSTR PathName OPTIONAL, - IN PCWSTR FileName, // OPTIONAL + IN PCWSTR PathNameToFile, OUT PUNICODE_STRING VendorName ) { @@ -560,18 +516,18 @@ *VendorName->Buffer = UNICODE_NULL; VendorName->Length = 0;
- Status = OpenAndMapFile(RootDirectory, PathName, FileName, + Status = OpenAndMapFile(RootDirectory, PathNameToFile, &FileHandle, &SectionHandle, &ViewBase, NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to open and map file '%S', Status 0x%08lx\n", FileName, Status); + DPRINT1("Failed to open and map file '%S', Status 0x%08lx\n", PathNameToFile, Status); return FALSE; // Status; }
/* Make sure it's a valid PE file */ if (!RtlImageNtHeader(ViewBase)) { - DPRINT1("File '%S' does not seem to be a valid PE, bail out\n", FileName); + DPRINT1("File '%S' does not seem to be a valid PE, bail out\n", PathNameToFile); Status = STATUS_INVALID_IMAGE_FORMAT; goto UnmapFile; } @@ -583,7 +539,7 @@ Status = NtGetVersionResource((PVOID)((ULONG_PTR)ViewBase | 1), &VersionBuffer, NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to get version resource for file '%S', Status 0x%08lx\n", FileName, Status); + DPRINT1("Failed to get version resource for file '%S', Status 0x%08lx\n", PathNameToFile, Status); goto UnmapFile; }
@@ -609,7 +565,7 @@ if (NT_SUCCESS(Status) /*&& pvData*/) { /* BufLen includes the NULL terminator count */ - DPRINT1("Found version vendor: "%S" for file '%S'\n", pvData, FileName); + DPRINT1("Found version vendor: "%S" for file '%S'\n", pvData, PathNameToFile);
StringCbCopyNW(VendorName->Buffer, VendorName->MaximumLength, pvData, BufLen * sizeof(WCHAR)); @@ -620,7 +576,7 @@ }
if (!NT_SUCCESS(Status)) - DPRINT1("No version vendor found for file '%S'\n", FileName); + DPRINT1("No version vendor found for file '%S'\n", PathNameToFile);
UnmapFile: /* Finally, unmap and close the file */ @@ -637,48 +593,30 @@ // - if it's broken or not (aka. needs for repair, or just upgrading). // static BOOLEAN -IsValidNTOSInstallation( - IN HANDLE SystemRootDirectory OPTIONAL, - IN PCWSTR SystemRoot OPTIONAL) +IsValidNTOSInstallationByHandle( + IN HANDLE SystemRootDirectory) { BOOLEAN Success = FALSE; USHORT i; UNICODE_STRING VendorName; - WCHAR PathBuffer[MAX_PATH]; - - /* - * Use either the 'SystemRootDirectory' handle or the 'SystemRoot' string, - * depending on what the user gave to us in entry. - */ - if (SystemRootDirectory) - SystemRoot = NULL; - // else SystemRootDirectory == NULL and SystemRoot is what it is. - - /* If both the parameters are NULL we cannot do anything else more */ - if (!SystemRootDirectory && !SystemRoot) - return FALSE; - - // DoesPathExist(SystemRootDirectory, SystemRoot, L"System32\"); etc... + WCHAR VendorNameBuffer[MAX_PATH];
/* Check for the existence of \SystemRoot\System32 */ - StringCchPrintfW(PathBuffer, ARRAYSIZE(PathBuffer), L"%s%s", SystemRoot ? SystemRoot : L"", L"System32\"); - if (!DoesPathExist(SystemRootDirectory, PathBuffer)) + if (!DoesPathExist(SystemRootDirectory, L"System32\")) { // DPRINT1("Failed to open directory '%wZ', Status 0x%08lx\n", &FileName, Status); return FALSE; }
/* Check for the existence of \SystemRoot\System32\drivers */ - StringCchPrintfW(PathBuffer, ARRAYSIZE(PathBuffer), L"%s%s", SystemRoot ? SystemRoot : L"", L"System32\drivers\"); - if (!DoesPathExist(SystemRootDirectory, PathBuffer)) + if (!DoesPathExist(SystemRootDirectory, L"System32\drivers\")) { // DPRINT1("Failed to open directory '%wZ', Status 0x%08lx\n", &FileName, Status); return FALSE; }
/* Check for the existence of \SystemRoot\System32\config */ - StringCchPrintfW(PathBuffer, ARRAYSIZE(PathBuffer), L"%s%s", SystemRoot ? SystemRoot : L"", L"System32\config\"); - if (!DoesPathExist(SystemRootDirectory, PathBuffer)) + if (!DoesPathExist(SystemRootDirectory, L"System32\config\")) { // DPRINT1("Failed to open directory '%wZ', Status 0x%08lx\n", &FileName, Status); return FALSE; @@ -689,22 +627,22 @@ * Check for the existence of SYSTEM and SOFTWARE hives in \SystemRoot\System32\config * (but we don't check here whether they are actually valid). */ - if (!DoesFileExist(SystemRootDirectory, SystemRoot, L"System32\config\SYSTEM")) + if (!DoesFileExist(SystemRootDirectory, L"System32\config\SYSTEM")) { // DPRINT1("Failed to open file '%wZ', Status 0x%08lx\n", &FileName, Status); return FALSE; } - if (!DoesFileExist(SystemRootDirectory, SystemRoot, L"System32\config\SOFTWARE")) + if (!DoesFileExist(SystemRootDirectory, L"System32\config\SOFTWARE")) { // DPRINT1("Failed to open file '%wZ', Status 0x%08lx\n", &FileName, Status); return FALSE; } #endif
- RtlInitEmptyUnicodeString(&VendorName, PathBuffer, sizeof(PathBuffer)); + RtlInitEmptyUnicodeString(&VendorName, VendorNameBuffer, sizeof(VendorNameBuffer));
/* Check for the existence of \SystemRoot\System32\ntoskrnl.exe and retrieves its vendor name */ - Success = CheckForValidPEAndVendor(SystemRootDirectory, SystemRoot, L"System32\ntoskrnl.exe", &VendorName); + Success = CheckForValidPEAndVendor(SystemRootDirectory, L"System32\ntoskrnl.exe", &VendorName); if (!Success) DPRINT1("Kernel file ntoskrnl.exe is either not a PE file, or does not have any vendor?\n");
@@ -726,7 +664,7 @@ /* OPTIONAL: Check for the existence of \SystemRoot\System32\ntkrnlpa.exe */
/* Check for the existence of \SystemRoot\System32\ntdll.dll and retrieves its vendor name */ - Success = CheckForValidPEAndVendor(SystemRootDirectory, SystemRoot, L"System32\ntdll.dll", &VendorName); + Success = CheckForValidPEAndVendor(SystemRootDirectory, L"System32\ntdll.dll", &VendorName); if (!Success) DPRINT1("User-mode file ntdll.dll is either not a PE file, or does not have any vendor?\n"); if (Success) @@ -743,6 +681,50 @@ }
return Success; +} + +static BOOLEAN +IsValidNTOSInstallation_UStr( + IN PUNICODE_STRING SystemRootPath) +{ + NTSTATUS Status; + OBJECT_ATTRIBUTES ObjectAttributes; + IO_STATUS_BLOCK IoStatusBlock; + HANDLE SystemRootDirectory; + BOOLEAN Success; + + /* Open SystemRootPath */ + InitializeObjectAttributes(&ObjectAttributes, + SystemRootPath, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + Status = NtOpenFile(&SystemRootDirectory, + FILE_LIST_DIRECTORY | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_SYNCHRONOUS_IO_NONALERT | FILE_DIRECTORY_FILE); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to open SystemRoot '%wZ', Status 0x%08lx\n", SystemRootPath, Status); + return FALSE; + } + + Success = IsValidNTOSInstallationByHandle(SystemRootDirectory); + + /* Done! */ + NtClose(SystemRootDirectory); + return Success; +} + +/*static*/ BOOLEAN +IsValidNTOSInstallation( + IN PCWSTR SystemRoot) +{ + UNICODE_STRING SystemRootPath; + RtlInitUnicodeString(&SystemRootPath, SystemRoot); + return IsValidNTOSInstallationByHandle(&SystemRootPath); }
static VOID @@ -932,7 +914,7 @@ for (i = 0; i < ARRAYSIZE(NtosBootLoaders); ++i) { /* Check whether the loader executable exists */ - if (!DoesFileExist(PartitionHandle, NULL, NtosBootLoaders[i].LoaderExecutable)) + if (!DoesFileExist(PartitionHandle, NtosBootLoaders[i].LoaderExecutable)) { /* The loader does not exist, continue with another one */ DPRINT1("Loader executable '%S' does not exist, continue with another one...\n", NtosBootLoaders[i].LoaderExecutable); @@ -940,7 +922,7 @@ }
/* Check whether the loader configuration file exists */ - Status = OpenAndMapFile(PartitionHandle, NULL, NtosBootLoaders[i].LoaderConfigurationFile, + Status = OpenAndMapFile(PartitionHandle, NtosBootLoaders[i].LoaderConfigurationFile, &FileHandle, &SectionHandle, &ViewBase, &FileSize); if (!NT_SUCCESS(Status)) {
Modified: branches/setup_improvements/base/setup/usetup/bootsup.c URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/us... ============================================================================== --- branches/setup_improvements/base/setup/usetup/bootsup.c [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/usetup/bootsup.c [iso-8859-1] Wed May 24 16:37:49 2017 @@ -2279,7 +2279,7 @@ /* Prepare for possibly copying 'freeldr.ini' */ CombinePaths(DstPath, ARRAYSIZE(DstPath), 2, SystemRootPath->Buffer, L"\freeldr.ini");
- DoesFreeLdrExist = DoesFileExist(NULL, NULL, DstPath); + DoesFreeLdrExist = DoesFileExist(NULL, DstPath); if (DoesFreeLdrExist) { /* Update existing 'freeldr.ini' */ @@ -2296,8 +2296,8 @@ /* Check for NT and other bootloaders */
// FIXME: Check for Vista+ bootloader! - if (DoesFileExist(NULL, SystemRootPath->Buffer, L"ntldr") == TRUE || - DoesFileExist(NULL, SystemRootPath->Buffer, L"boot.ini") == TRUE) + if (DoesFileExist_2(SystemRootPath->Buffer, L"ntldr") == TRUE || + DoesFileExist_2(SystemRootPath->Buffer, L"boot.ini") == TRUE) { /* Search root directory for 'ntldr' and 'boot.ini' */ DPRINT1("Found Microsoft Windows NT/2000/XP boot loader\n"); @@ -2374,8 +2374,8 @@ PWCHAR BootSector; PWCHAR BootSectorFileName;
- if (DoesFileExist(NULL, SystemRootPath->Buffer, L"io.sys") == TRUE || - DoesFileExist(NULL, SystemRootPath->Buffer, L"msdos.sys") == TRUE) + if (DoesFileExist_2(SystemRootPath->Buffer, L"io.sys") == TRUE || + DoesFileExist_2(SystemRootPath->Buffer, L"msdos.sys") == TRUE) { /* Search for root directory for 'io.sys' and 'msdos.sys' */ DPRINT1("Found Microsoft DOS or Windows 9x boot loader\n"); @@ -2389,7 +2389,7 @@ BootSectorFileName = L"\bootsect.dos"; } else - if (DoesFileExist(NULL, SystemRootPath->Buffer, L"kernel.sys") == TRUE) + if (DoesFileExist_2(SystemRootPath->Buffer, L"kernel.sys") == TRUE) { /* Search for root directory for 'kernel.sys' */ DPRINT1("Found FreeDOS boot loader\n"); @@ -2525,7 +2525,7 @@ /* Prepare for possibly copying 'freeldr.ini' */ CombinePaths(DstPath, ARRAYSIZE(DstPath), 2, SystemRootPath->Buffer, L"\freeldr.ini");
- DoesFreeLdrExist = DoesFileExist(NULL, NULL, DstPath); + DoesFreeLdrExist = DoesFileExist(NULL, DstPath); if (DoesFreeLdrExist) { /* Update existing 'freeldr.ini' */
Modified: branches/setup_improvements/base/setup/usetup/interface/usetup.c URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/us... ============================================================================== --- branches/setup_improvements/base/setup/usetup/interface/usetup.c [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/usetup/interface/usetup.c [iso-8859-1] Wed May 24 16:37:49 2017 @@ -432,7 +432,7 @@
CombinePaths(UnattendInfPath, ARRAYSIZE(UnattendInfPath), 2, SourcePath.Buffer, L"\unattend.inf");
- if (DoesFileExist(NULL, NULL, UnattendInfPath) == FALSE) + if (DoesFileExist(NULL, UnattendInfPath) == FALSE) { DPRINT("Does not exist: %S\n", UnattendInfPath); return;