diff --git a/src/format.c b/src/format.c index 59ca11df..e43156b2 100644 --- a/src/format.c +++ b/src/format.c @@ -1281,7 +1281,8 @@ out: // Checks which versions of Windows are available in an install.wim image // to set our extraction index. Asks the user to select one if needed. -BOOL SetWinToGoIndex(void) +// Returns -2 on user cancel, -1 on other error, >=0 on success. +int SetWinToGoIndex(void) { char *mounted_iso, *build, image[128]; char tmp_path[MAX_PATH] = "", xml_file[MAX_PATH] = ""; @@ -1344,7 +1345,7 @@ BOOL SetWinToGoIndex(void) if ((build_nr < 15000) && (SelectedDrive.MediaType != FixedMedia)) { if (MessageBoxExU(hMainDialog, lmprintf(MSG_098), lmprintf(MSG_190), MB_YESNO | MB_ICONWARNING | MB_IS_RTL, selected_langid) != IDYES) - wintogo_index = -1; + wintogo_index = -2; } } StrArrayDestroy(&version_name); @@ -1353,7 +1354,7 @@ BOOL SetWinToGoIndex(void) out: DeleteFileU(xml_file); UnMountISO(); - return (wintogo_index >= 0); + return wintogo_index; } // http://technet.microsoft.com/en-ie/library/jj721578.aspx diff --git a/src/rufus.c b/src/rufus.c index 393a1df9..e1e3f582 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -1308,8 +1308,15 @@ static BOOL BootCheck(void) } } // If multiple versions are available, asks the user to select one before we commit to format the drive - if (!SetWinToGoIndex()) + switch(SetWinToGoIndex()) { + case -1: + MessageBoxExU(hMainDialog, lmprintf(MSG_073), lmprintf(MSG_291), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid); + // fall through + case -2: return FALSE; + default: + break; + } } else if (tt == TT_UEFI) { if (!IS_EFI_BOOTABLE(img_report)) { // Unsupported ISO diff --git a/src/rufus.h b/src/rufus.h index 8b57e2b9..7d158f7e 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -480,7 +480,7 @@ extern BOOL WimExtractFile_7z(const char* image, int index, const char* src, con extern BOOL WimApplyImage(const char* image, int index, const char* dst); extern BOOL IsBootableImage(const char* path); extern BOOL AppendVHDFooter(const char* vhd_path); -extern BOOL SetWinToGoIndex(void); +extern int SetWinToGoIndex(void); extern int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid); extern char* GetSignatureName(const char* path); extern LONG ValidateSignature(HWND hDlg, const char* path); diff --git a/src/rufus.rc b/src/rufus.rc index 9028f368..ec84f6d1 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,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 EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.15.1102" +CAPTION "Rufus 2.15.1103" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -334,8 +334,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,15,1102,0 - PRODUCTVERSION 2,15,1102,0 + FILEVERSION 2,15,1103,0 + PRODUCTVERSION 2,15,1103,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -352,13 +352,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.15.1102" + VALUE "FileVersion", "2.15.1103" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.15.1102" + VALUE "ProductVersion", "2.15.1103" END END BLOCK "VarFileInfo"