diff --git a/src/drive.c b/src/drive.c index bdff95bf..f8d490c3 100644 --- a/src/drive.c +++ b/src/drive.c @@ -1049,9 +1049,6 @@ BOOL CreatePartition(HANDLE hDrive, int partition_style, int file_system, BOOL m DriveLayoutEx.PartitionEntry[pn].Gpt.PartitionType = PARTITION_MSFT_RESERVED_GUID; IGNORE_RETVAL(CoCreateGuid(&DriveLayoutEx.PartitionEntry[pn].Gpt.PartitionId)); wcscpy(DriveLayoutEx.PartitionEntry[pn].Gpt.Name, L"Microsoft reserved partition"); - pn++; - DriveLayoutEx.PartitionEntry[pn].StartingOffset.QuadPart = DriveLayoutEx.PartitionEntry[pn-1].StartingOffset.QuadPart + - DriveLayoutEx.PartitionEntry[pn-1].PartitionLength.QuadPart; // We must zero the beginning of this partition, else we get FAT leftovers and stuff if (SetFilePointerEx(hDrive, DriveLayoutEx.PartitionEntry[pn].StartingOffset, NULL, FILE_BEGIN)) { @@ -1063,6 +1060,10 @@ BOOL CreatePartition(HANDLE hDrive, int partition_style, int file_system, BOOL m free(buffer); } } + + pn++; + DriveLayoutEx.PartitionEntry[pn].StartingOffset.QuadPart = DriveLayoutEx.PartitionEntry[pn-1].StartingOffset.QuadPart + + DriveLayoutEx.PartitionEntry[pn-1].PartitionLength.QuadPart; } // Set our main data partition diff --git a/src/format.c b/src/format.c index 0176fff2..24b0362b 100644 --- a/src/format.c +++ b/src/format.c @@ -1336,9 +1336,13 @@ BOOL SetupWinToGo(const char* drive_name, BOOL use_ms_efi) fclose(fd); } else { fclose(fd); + // Can't use the one from the USB (at least for Windows 10 preview), as you'll get + // "Error: 0x800401f0 An error occurred while initializing COM security". + // On the other hand, using Windows 8.1 dism against Windows 10 doesn't work either + // (you get a message about needing to upgrade to latest AIK)... static_sprintf(cmd, "dism /Image:%s\\ /Apply-Unattend:%s", drive_name, san_policy_path); if (RunCommand(cmd, NULL, TRUE) != 0) - uprintf("Command '%s' failed to run"); + uprintf("Command '%s' failed to run", cmd); } uprintf("Copying 'unattend.xml'"); diff --git a/src/rufus.rc b/src/rufus.rc index e5eee4e8..3f2f06e3 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Rufus 2.0.0.586" +CAPTION "Rufus 2.0.0.587" FONT 8, "Segoe UI", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Start",IDC_START,127,339,50,14 @@ -157,7 +157,7 @@ END IDD_DIALOG_XP DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Rufus 2.0.0.586" +CAPTION "Rufus 2.0.0.587" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Start",IDC_START,127,339,50,14 @@ -283,7 +283,7 @@ END IDD_DIALOG_RTL DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL -CAPTION "Rufus 2.0.0.586" +CAPTION "Rufus 2.0.0.587" FONT 8, "Segoe UI", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Start",IDC_START,127,339,50,14 @@ -415,7 +415,7 @@ END IDD_DIALOG_RTL_XP DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL -CAPTION "Rufus 2.0.0.586" +CAPTION "Rufus 2.0.0.587" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Start",IDC_START,127,339,50,14 @@ -671,8 +671,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,0,586 - PRODUCTVERSION 2,0,0,586 + FILEVERSION 2,0,0,587 + PRODUCTVERSION 2,0,0,587 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -689,13 +689,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.0.0.586" + VALUE "FileVersion", "2.0.0.587" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.0.0.586" + VALUE "ProductVersion", "2.0.0.587" END END BLOCK "VarFileInfo" diff --git a/src/vhd.c b/src/vhd.c index 1a2d907b..8585e342 100644 --- a/src/vhd.c +++ b/src/vhd.c @@ -347,7 +347,8 @@ uint8_t WimExtractCheck(void) uprintf("WIM extraction method(s) supported: %s%s%s", (wim_flags & WIM_HAS_7Z_EXTRACT)?"7-Zip": ((wim_flags & WIM_HAS_API_EXTRACT)?"":"NONE"), - (WIM_HAS_EXTRACT(wim_flags))?", ":"", (wim_flags & WIM_HAS_API_EXTRACT)?"wimgapi.dll":""); + (WIM_HAS_EXTRACT(wim_flags) == (WIM_HAS_API_EXTRACT|WIM_HAS_7Z_EXTRACT))?", ": + "", (wim_flags & WIM_HAS_API_EXTRACT)?"wimgapi.dll":""); uprintf("WIM apply method supported: %s", (wim_flags & WIM_HAS_API_APPLY)?"wimgapi.dll":"NONE"); return wim_flags; }