1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[fido] deactivate Fido for Windows 7

* Also add an extra Fido translation string and improve/fix Fido testing.
* Also add an exception for HP iLO SD-CARD devices (Closes #2136).
This commit is contained in:
Pete Batard 2023-01-27 17:23:08 +00:00
parent 1dc9fab917
commit 6ebe13eb31
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
10 changed files with 43 additions and 24 deletions

View file

@ -8,6 +8,7 @@ Or simply download https://files.akeo.ie/pollock/pollock-1.4.exe and follow its
o v3.22 (2023.??.??)
// MSG_294 can be tested by launching Rufus from the commandline with option -z61
- *UPDATED* MSG_144 "Temporarily banned by Microsoft for requesting too many downloads (...)" -> "Download of Windows ISOs is unavailable due to Microsoft having altered their website to prevent it."
- *NEW* MSG_199 "This feature is not available for this version of Windows."
- *UPDATED* MSG_294 "This version of Windows is no longer supported by Rufus." -> added "\nThe last version of Rufus compatible with this platform is v%d.%d."
- *NEW* MSG_323 "Unable to open or read '%s'"
- *NEW* MSG_325 "Applying Windows customization: %s"

View file

@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: 3.14\n"
"Report-Msgid-Bugs-To: pete@akeo.ie\n"
"POT-Creation-Date: 2023-01-09 23:02+0000\n"
"PO-Revision-Date: 2023-01-09 23:07+0000\n"
"POT-Creation-Date: 2023-01-27 12:23+0000\n"
"PO-Revision-Date: 2023-01-27 12:29+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr_FR\n"
@ -1199,6 +1199,10 @@ msgstr "Taille de secteur non standard détectée"
msgid "'Windows To Go' can only be installed on a GPT partitioned drive if it has the FIXED attribute set. The current drive was not detected as FIXED."
msgstr "'Windows To Go' peut seulement être installé sur un disque partitionné au format GPT si il a l'attribut FIXE.Le disque sélectionné na pas été détecté comme FIXE."
#. • MSG_199
msgid "This feature is not available for this version of Windows."
msgstr "Cette fonctionalité n'est pas disponible avec cette version de Windows."
#. • MSG_201
msgid "Cancelling - Please wait..."
msgstr "Annulation - Veuillez patienter..."
@ -1839,3 +1843,7 @@ msgstr "Définir les options régionales avec les mêmes valeurs que celles de c
#. • MSG_335
msgid "Disable BitLocker automatic device encryption"
msgstr "Désactiver l'encryption automatique BitLocker"
#. • MSG_336
msgid "Persistent log"
msgstr ""

View file

@ -414,9 +414,8 @@ t MSG_196 "IMPORTANT: THIS DRIVE USES A NONSTANDARD SECTOR SIZE!\n\n"
"In many cases, this means that you will NOT be able to boot from this drive.\n"
"Rufus can try to create a bootable drive, but there is NO WARRANTY that it will work."
t MSG_197 "Nonstandard sector size detected"
t MSG_198 "'Windows To Go' can only be installed on a GPT partitioned drive if it has "
"the FIXED attribute set. The current drive was not detected as FIXED."
t MSG_198 "'Windows To Go' can only be installed on a GPT partitioned drive if it has the FIXED attribute set. The current drive was not detected as FIXED."
t MSG_199 "This feature is not available for this version of Windows."
t MSG_201 "Cancelling - Please wait..."
t MSG_202 "Scanning image..."
t MSG_203 "Failed to scan image"
@ -4185,6 +4184,7 @@ t MSG_195 "La version par défaut du fichier %s sera utilisée"
t MSG_196 "IMPORTANT : CE PÉRIPHÉRIQUE UTILISE UNE TAILLE DE SECTEUR NON STANDARD !\n\nLa majorité des disques utilisent une taille de secteur de 512 octets, mais celui ci utilise une taille de %d octets. Dans la majorité des cas, cela veut dire que vous ne POUVEZ PAS démarrer un oridinateur depusi ce disque.\nRufus peut toujours essayer de créer un disque démarrable, mais il n'y a AUCUNE guarantie que cela marchera."
t MSG_197 "Taille de secteur non standard détectée"
t MSG_198 "'Windows To Go' peut seulement être installé sur un disque partitionné au format GPT si il a l'attribut FIXE.Le disque sélectionné na pas été détecté comme FIXE."
t MSG_199 "Cette fonctionalité n'est pas disponible avec cette version de Windows."
t MSG_201 "Annulation - Veuillez patienter..."
t MSG_202 "Analyse de l'image..."
t MSG_203 "Echec d'analyse de l'image"

View file

@ -1,7 +1,7 @@
/*
* Rufus: The Reliable USB Formatting Utility
* Device detection and enumeration
* Copyright © 2014-2021 Pete Batard <pete@akeo.ie>
* Copyright © 2014-2023 Pete Batard <pete@akeo.ie>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -419,8 +419,8 @@ BOOL GetOpticalMedia(IMG_SAVE* img_save)
//#define FORCED_DEVICE
#ifdef FORCED_DEVICE
#define FORCED_VID 0x048D
#define FORCED_PID 0x1234
#define FORCED_NAME "VendorCo Disk USB Device"
#define FORCED_PID 0x4030
#define FORCED_NAME "HP iLO Internal SD-CARD USB Device"
#endif
void ClearDrives(void)

View file

@ -1,7 +1,7 @@
/*
* Rufus: The Reliable USB Formatting Utility
* SMART HDD vs Flash detection - isHDD() tables
* Copyright © 2013-2022 Pete Batard <pete@akeo.ie>
* Copyright © 2013-2023 Pete Batard <pete@akeo.ie>
*
* Based in part on drivedb.h from Smartmontools:
* http://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools/drivedb.h
@ -90,6 +90,7 @@ static str_score_t str_score[] = {
static str_score_t str_adjust[] = {
{ "Gadget", -10 },
{ "Flash", -10 },
{ "SD-CARD", -10 },
{ "HDD", +20 },
{ "SSD", +20 }
};

View file

@ -1,7 +1,7 @@
/*
* Rufus: The Reliable USB Formatting Utility
* Networking functionality (web file download, check for update, etc.)
* Copyright © 2012-2022 Pete Batard <pete@akeo.ie>
* Copyright © 2012-2023 Pete Batard <pete@akeo.ie>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -982,11 +982,11 @@ static DWORD WINAPI DownloadISOThread(LPVOID param)
safe_closehandle(hFile);
#endif
static_sprintf(powershell_path, "%s\\WindowsPowerShell\\v1.0\\powershell.exe", system_dir);
static_sprintf(locale_str, "%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s",
static_sprintf(locale_str, "%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s",
selected_locale->txt[0], lmprintf(MSG_135), lmprintf(MSG_136), lmprintf(MSG_137),
lmprintf(MSG_138), lmprintf(MSG_139), lmprintf(MSG_040), lmprintf(MSG_140), lmprintf(MSG_141),
lmprintf(MSG_006), lmprintf(MSG_007), lmprintf(MSG_042), lmprintf(MSG_142), lmprintf(MSG_143),
lmprintf(MSG_144), lmprintf(MSG_145), lmprintf(MSG_146));
lmprintf(MSG_144), lmprintf(MSG_145), lmprintf(MSG_146), lmprintf(MSG_199));
hPipe = CreateNamedPipeA(pipe, PIPE_ACCESS_INBOUND,
PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES,
@ -1000,6 +1000,7 @@ static DWORD WINAPI DownloadISOThread(LPVOID param)
"-File \"%s\" -PipeName %s -LocData \"%s\" -Icon \"%s\" -AppTitle \"%s\"",
powershell_path, script_path, &pipe[9], locale_str, icon_path, lmprintf(MSG_149));
#ifndef RUFUS_TEST
// For extra security, even after we validated that the LZMA download is properly
// signed, we also validate the Authenticode signature of the local script.
if (ValidateSignature(INVALID_HANDLE_VALUE, script_path) != NO_ERROR) {
@ -1010,6 +1011,7 @@ static DWORD WINAPI DownloadISOThread(LPVOID param)
goto out;
}
uprintf("Script signature is valid ✓");
#endif
dwExitCode = RunCommand(cmdline, app_data_dir, TRUE);
uprintf("Exited download script with code: %d", dwExitCode);

View file

@ -109,7 +109,7 @@
#define RSA_SIGNATURE_SIZE 256
#define CBN_SELCHANGE_INTERNAL (CBN_SELCHANGE + 256)
#if defined(RUFUS_TEST)
#define RUFUS_URL "http://nano/~rufus"
#define RUFUS_URL "http://nas/~rufus"
#else
#define RUFUS_URL "https://rufus.ie"
#endif

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.22.1958"
CAPTION "Rufus 3.22.1959"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -396,8 +396,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,22,1958,0
PRODUCTVERSION 3,22,1958,0
FILEVERSION 3,22,1959,0
PRODUCTVERSION 3,22,1959,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -415,13 +415,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.22.1958"
VALUE "FileVersion", "3.22.1959"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2023 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-3.22.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.22.1958"
VALUE "ProductVersion", "3.22.1959"
END
END
BLOCK "VarFileInfo"

View file

@ -1,7 +1,7 @@
/*
* Rufus: The Reliable USB Formatting Utility
* SMART HDD vs Flash detection (using ATA over USB, S.M.A.R.T., etc.)
* Copyright © 2013-2020 Pete Batard <pete@akeo.ie>
* Copyright © 2013-2023 Pete Batard <pete@akeo.ie>
*
* Based in part on scsiata.cpp from Smartmontools: http://smartmontools.sourceforge.net
* Copyright © 2006-2012 Douglas Gilbert <dgilbert@interlog.com>
@ -459,7 +459,7 @@ int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid)
// Check the string against well known HDD identifiers
if (strid != NULL) {
ilen = strlen(strid);
for (i=0; i<ARRAYSIZE(str_score); i++) {
for (i = 0; i < ARRAYSIZE(str_score); i++) {
mlen = strlen(str_score[i].name);
if (mlen > ilen)
break;
@ -474,13 +474,13 @@ int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid)
// Adjust for oddball devices
if (strid != NULL) {
for (i=0; i<ARRAYSIZE(str_adjust); i++)
if (strstr(strid, str_adjust[i].name) != NULL)
for (i = 0; i < ARRAYSIZE(str_adjust); i++)
if (StrStrIA(strid, str_adjust[i].name) != NULL)
score += str_adjust[i].score;
}
// Check against known VIDs
for (i=0; i<ARRAYSIZE(vid_score); i++) {
for (i = 0; i < ARRAYSIZE(vid_score); i++) {
if (vid == vid_score[i].vid) {
score += vid_score[i].score;
break;
@ -488,7 +488,7 @@ int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid)
}
// Check against known VID:PIDs
for (i=0; i<ARRAYSIZE(vidpid_score); i++) {
for (i = 0; i < ARRAYSIZE(vidpid_score); i++) {
if ((vid == vidpid_score[i].vid) && (pid == vidpid_score[i].pid)) {
score += vidpid_score[i].score;
break;

View file

@ -1626,6 +1626,7 @@ void SetFidoCheck(void)
// - Powershell being installed
// - Rufus running in AppStore mode or update check being enabled
// - URL for the script being reachable
// - Windows version being Windows 8.0 or later
if ((ReadRegistryKey32(REGKEY_HKLM, "Software\\Microsoft\\PowerShell\\1\\Install") <= 0) &&
(ReadRegistryKey32(REGKEY_HKLM, "Software\\Microsoft\\PowerShell\\3\\Install") <= 0)) {
ubprintf("Notice: The ISO download feature has been deactivated because "
@ -1639,6 +1640,12 @@ void SetFidoCheck(void)
return;
}
if (nWindowsVersion < WINDOWS_8) {
ubprintf("Notice: The ISO download feature has been deactivated because "
"your version of Windows is too old.");
return;
}
CreateThread(NULL, 0, CheckForFidoThread, NULL, 0, NULL);
}