diff --git a/reactos/subsys/system/usetup/bootsup.c b/reactos/subsys/system/usetup/bootsup.c index 0e654f4f98f..309b3ae9a57 100644 --- a/reactos/subsys/system/usetup/bootsup.c +++ b/reactos/subsys/system/usetup/bootsup.c @@ -371,7 +371,7 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath, NULL, INSERT_LAST, L"Options", - L"/DEBUGPORT=COM1 /NOGUIBOOT"); + L"/DEBUGPORT=SCREEN /NOGUIBOOT"); /* Save the ini file */ IniCacheSave(IniCache, IniPath); @@ -1134,15 +1134,19 @@ InstallMbrBootCodeToDisk (PWSTR SrcPath, NULL, NULL); - Status = NtOpenFile(&FileHandle, - FILE_WRITE_ACCESS | FILE_WRITE_ATTRIBUTES, - &ObjectAttributes, - &IoStatusBlock, - 0, - FILE_SYNCHRONOUS_IO_NONALERT | FILE_SEQUENTIAL_ONLY); + Status = NtCreateFile(&FileHandle, + FILE_WRITE_ACCESS, + &ObjectAttributes, + &IoStatusBlock, + NULL, + FILE_ATTRIBUTE_NORMAL, + 0, + FILE_OVERWRITE_IF, + FILE_SYNCHRONOUS_IO_NONALERT | FILE_SEQUENTIAL_ONLY, + NULL, + 0); if (!NT_SUCCESS(Status)) { - DPRINT1("NtOpenFile() failed (Status %lx)\n", Status); RtlFreeHeap(ProcessHeap, 0, NewBootSector); return(Status); } @@ -1291,15 +1295,19 @@ InstallFat16BootCodeToDisk(PWSTR SrcPath, NULL, NULL); - Status = NtOpenFile(&FileHandle, - FILE_WRITE_ACCESS | FILE_WRITE_ATTRIBUTES, - &ObjectAttributes, - &IoStatusBlock, - 0, - FILE_SYNCHRONOUS_IO_NONALERT | FILE_SEQUENTIAL_ONLY); + Status = NtCreateFile(&FileHandle, + FILE_WRITE_ACCESS, + &ObjectAttributes, + &IoStatusBlock, + NULL, + FILE_ATTRIBUTE_NORMAL, + 0, + FILE_OVERWRITE_IF, + FILE_SYNCHRONOUS_IO_NONALERT | FILE_SEQUENTIAL_ONLY, + NULL, + 0); if (!NT_SUCCESS(Status)) { - DPRINT1("NtOpenFile() failed (Status %lx)\n", Status); RtlFreeHeap(ProcessHeap, 0, NewBootSector); return(Status); } @@ -2072,7 +2080,7 @@ InstallFatBootcodeToFloppy(PUNICODE_STRING SourceRootPath, wcscpy(SrcPath, SourceRootPath->Buffer); wcscat(SrcPath, L"\\loader\\freeldr.sys"); - wcscpy(DstPath, L"\\Device\\Floppy0\\freeldr.sys"); + wcscat(DstPath, L"\\Device\\Floppy0\\freeldr.sys"); DPRINT("Copy: %S ==> %S\n", SrcPath, DstPath); Status = SetupCopyFile(SrcPath, DstPath); @@ -2083,7 +2091,7 @@ InstallFatBootcodeToFloppy(PUNICODE_STRING SourceRootPath, } /* Create new 'freeldr.ini' */ - wcscpy(DstPath, L"\\Device\\Floppy0\\freeldr.ini"); + wcscat(DstPath, L"\\Device\\Floppy0\\freeldr.ini"); DPRINT("Create new 'freeldr.ini'\n"); Status = CreateFreeLoaderIniForReactos(DstPath, @@ -2098,7 +2106,7 @@ InstallFatBootcodeToFloppy(PUNICODE_STRING SourceRootPath, wcscpy(SrcPath, SourceRootPath->Buffer); wcscat(SrcPath, L"\\loader\\fat.bin"); - wcscpy(DstPath, L"\\Device\\Floppy0"); + wcscat(DstPath, L"\\Device\\Floppy0"); DPRINT("Install FAT bootcode: %S ==> %S\n", SrcPath, DstPath); Status = InstallFat16BootCodeToDisk(SrcPath,