diff --git a/src/format.c b/src/format.c index 27bd25c4..13bb500c 100644 --- a/src/format.c +++ b/src/format.c @@ -476,7 +476,7 @@ static BOOL WriteMBR(HANDLE hPhysicalDrive) } if (IsChecked(IDC_DOS)) { // Set first partition bootable - masquerade as 0x81 for non /minint WinPE - buf[0x1be] = (IS_WINPE(iso_report.winpe) && iso_report.uses_minint)?0x80:0x81; + buf[0x1be] = ((!IS_WINPE(iso_report.winpe)) || ((IS_WINPE(iso_report.winpe) && iso_report.uses_minint)))?0x80:0x81; uprintf("Set bootable USB partition as 0x%02X\n", buf[0x1be]); } @@ -580,9 +580,8 @@ static BOOL SetupWinPE(char drive_letter) { char src[64], dst[32]; const char* basedir[] = { "i386", "minint" }; - const char* patch_str_org[] = { "\\minint\\txtsetup.sif", "\\minint\\system32\\", "\\ntdetect.com" }; - // NB: that last patched string will overflow onto the "ntdetect.com" used for net, which we don't care about - const char* patch_str_rep[] = { "\\i386\\txtsetup.sif", "\\i386\\system32\\", "\\i386\\ntdetect.com" }; + const char* patch_str_org[] = { "\\minint\\txtsetup.sif", "\\minint\\system32\\" }; + const char* patch_str_rep[] = { "\\i386\\txtsetup.sif", "\\i386\\system32\\" }; const char *win_nt_bt_org = "$win_nt$.~bt", *win_nt_bt_rep = "i386"; const char *rdisk_zero = "rdisk(0)"; // TODO: allow other values than harddisk 1, as per user choice? @@ -593,6 +592,10 @@ static BOOL SetupWinPE(char drive_letter) char* buf = NULL; index = ((iso_report.winpe&WINPE_I386) == WINPE_I386)?0:1; + // Copy of ntdetect.com in root + safe_sprintf(src, sizeof(src), "%c:\\%s\\ntdetect.com", drive_letter, basedir[index]); + safe_sprintf(dst, sizeof(dst), "%c:\\ntdetect.com", drive_letter); + CopyFileA(src, dst, TRUE); if (!iso_report.uses_minint) { // Create a copy of txtsetup.sif, as we want to keep the i386 files unmodified safe_sprintf(src, sizeof(src), "%c:\\%s\\txtsetup.sif", drive_letter, basedir[index]); @@ -655,8 +658,6 @@ static BOOL SetupWinPE(char drive_letter) for (i=1; i '%s'\n", i, &buf[i], patch_str_rep[j]); strcpy(&buf[i], patch_str_rep[j]); i += (DWORD)max(strlen(patch_str_org[j]), strlen(patch_str_rep[j])); // in case org is a substring of rep diff --git a/src/rufus.rc b/src/rufus.rc index 461854ec..f01ef7f4 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 206, 289 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW -CAPTION "Rufus v1.2.0.165" +CAPTION "Rufus v1.2.0.166" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Start",IDC_START,94,248,50,14 @@ -71,7 +71,7 @@ BEGIN DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP CONTROL "http://rufus.akeo.ie",IDC_ABOUT_RUFUS_URL, "SysLink",WS_TABSTOP,46,47,114,9 - LTEXT "Version 1.2.0 (Build 165)",IDC_STATIC,46,19,78,8 + LTEXT "Version 1.2.0 (Build 166)",IDC_STATIC,46,19,78,8 PUSHBUTTON "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP EDITTEXT IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL LTEXT "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8 @@ -216,8 +216,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,2,0,165 - PRODUCTVERSION 1,2,0,165 + FILEVERSION 1,2,0,166 + PRODUCTVERSION 1,2,0,166 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -234,13 +234,13 @@ BEGIN BEGIN VALUE "CompanyName", "akeo.ie" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "1.2.0.165" + VALUE "FileVersion", "1.2.0.166" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "1.2.0.165" + VALUE "ProductVersion", "1.2.0.166" END END BLOCK "VarFileInfo"