mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[loc] finalize translations for 3.5
* Also update for latest Fido and simplify SetLGP
This commit is contained in:
parent
688ccfad66
commit
0c368b4e69
10 changed files with 169 additions and 191 deletions
|
@ -2,19 +2,31 @@ This file lists all the changes that have been applied to the en-US translation
|
||||||
rufus.loc since its original version.
|
rufus.loc since its original version.
|
||||||
|
|
||||||
To edit a translation, please make sure to follow:
|
To edit a translation, please make sure to follow:
|
||||||
https://github.com/pbatard/rufus/wiki/Localization#Editing_a_translation
|
https://github.com/pbatard/rufus/wiki/Localization#Editing_an_existing_translation
|
||||||
Or simply download the latest pollock.exe from https://rufus.ie/locale/ and follow
|
Or simply download https://rufus-web.akeo.ie/locale/pollock.exe and follow its directions.
|
||||||
its directions.
|
|
||||||
|
|
||||||
o v3.5
|
o v3.5 (2019.03.12)
|
||||||
|
The following 3 messages can be tested by creating a UEFI:NTFS drive in Rufus ('Show advanced drive properties' must be enabled
|
||||||
|
and then you can just select 'UEFI:NTFS' under 'Boot selection' and click 'START'. Then, when the drive creation is complete, you
|
||||||
|
will see a dialog using the 3 messages below)
|
||||||
- *NEW* MSG_127 "Do not show this message again"
|
- *NEW* MSG_127 "Do not show this message again"
|
||||||
- *NEW* MSG_128 "Important notice about %s" where %s will be one of "MBR", "Secure Boot", "Windows To Go"
|
In the following '%s' will be one of "MBR", "Secure Boot", "Windows To Go" (in English). Please be mindful that the (...) below
|
||||||
|
means that there is MORE DATA to this message and that you need to look at the English version in the loc file for the full text.
|
||||||
|
- *NEW* MSG_128 "Important notice about %s"
|
||||||
- *NEW* MSG_129 "You have just created a media that includes the UEFI:NTFS bootloader (...)"
|
- *NEW* MSG_129 "You have just created a media that includes the UEFI:NTFS bootloader (...)"
|
||||||
|
The following 2 messages can be tested when creating a Windows image from the latest Windows 10 retail ISOs
|
||||||
- *NEW* MSG_130 "Windows image selection"
|
- *NEW* MSG_130 "Windows image selection"
|
||||||
- *NEW* MSG_131 "This ISO contains multiple Windows images.\nPlease select the image you wish to use for this installation:"
|
- *NEW* MSG_131 "This ISO contains multiple Windows images.\nPlease select the image you wish to use for this installation:"
|
||||||
|
You should be able to see this message if you open a command prompt to the root of your flash drive and then attempt to format
|
||||||
|
it in Rufus. For instance, if your flash drive is E: just open cmd.exe and then type E: to navigate to that drive.
|
||||||
- *NEW* MSG_132 "Another program or process is accessing this drive. Do you want to format it anyway?"
|
- *NEW* MSG_132 "Another program or process is accessing this drive. Do you want to format it anyway?"
|
||||||
|
The following message will appear if you create a Windows To Go drive from a Windows 10 1809 ISO. Please be mindful that the (...)
|
||||||
|
below means that there is MORE DATA to this message and that you need to look at the English version to translate it.
|
||||||
- *NEW* MSG_133 "Rufus has detected that you are attempting to create a Windows To Go media based on a 1809 ISO. (...)"
|
- *NEW* MSG_133 "Rufus has detected that you are attempting to create a Windows To Go media based on a 1809 ISO. (...)"
|
||||||
|
The following will appear if you attempt to format a drive that is larger than 2 TB. Again, please be mindful that (...) means
|
||||||
|
that there is more data to this message and that you must look at the English version to translate it.
|
||||||
- *NEW* MSG_134 "Because MBR has been selected for the partition scheme, Rufus can only create a partition up to 2 TB (...)"
|
- *NEW* MSG_134 "Because MBR has been selected for the partition scheme, Rufus can only create a partition up to 2 TB (...)"
|
||||||
|
MSG_135 to 149 appear in the "Download ISO Image" dialog that is proposed from the SELECT split button when clicking DOWNLOAD
|
||||||
- *NEW* MSG_135 "Version"
|
- *NEW* MSG_135 "Version"
|
||||||
- *NEW* MSG_136 "Release"
|
- *NEW* MSG_136 "Release"
|
||||||
- *NEW* MSG_137 "Edition"
|
- *NEW* MSG_137 "Edition"
|
||||||
|
@ -23,10 +35,15 @@ o v3.5
|
||||||
- *NEW* MSG_140 "Confirm"
|
- *NEW* MSG_140 "Confirm"
|
||||||
- *NEW* MSG_141 "Back"
|
- *NEW* MSG_141 "Back"
|
||||||
- *NEW* MSG_142 "Please wait..."
|
- *NEW* MSG_142 "Please wait..."
|
||||||
- *NEW* MSG_143 "Download ISO Image"
|
- *NEW* MSG_143 "Download using a browser"
|
||||||
- *NEW* MSG_144 "Download using a browser"
|
- *NEW* MSG_144 "Temporarily banned by Microsoft for requesting too many downloads - Please try again later..."
|
||||||
- *NEW* MSG_149 "Running download script..."
|
The following 2 messages should only appear on vanilla Windows 7 platforms when launching the 'Download ISO Image' script
|
||||||
- *UPDATED* MSG_165
|
- *NEW* MSG_145 "PowerShell 3.0 or later is required to run this script."
|
||||||
|
- *NEW* MSG_146 "Do you want to go online and download it?"
|
||||||
|
- *NEW* MSG_148 "Running download script..."
|
||||||
|
- *NEW* MSG_149 "Download ISO Image"
|
||||||
|
The tooltip for the SELECT button has been updated to mention downloads
|
||||||
|
- *UPDATED* MSG_165 "Click to select an image..." -> "Click to select or download an image..."
|
||||||
|
|
||||||
o v3.2 (2018.07.20)
|
o v3.2 (2018.07.20)
|
||||||
The following appears in Advanced format options → Check device for bad blocks → dropdown menu with
|
The following appears in Advanced format options → Check device for bad blocks → dropdown menu with
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 3.2\n"
|
"Project-Id-Version: 3.5\n"
|
||||||
"Report-Msgid-Bugs-To: pete@akeo.ie\n"
|
"Report-Msgid-Bugs-To: pete@akeo.ie\n"
|
||||||
"POT-Creation-Date: 2019-02-01 12:29+0000\n"
|
"POT-Creation-Date: 2019-03-12 13:52+0000\n"
|
||||||
"PO-Revision-Date: 2019-02-01 12:29+0000\n"
|
"PO-Revision-Date: 2019-03-12 13:52+0000\n"
|
||||||
"Language: fr_FR\n"
|
"Language: fr_FR\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
@ -583,8 +583,8 @@ msgstr ""
|
||||||
"Note : Le nouveau fichier sera téléchargé dans le répertoire courant. Si un '%s' existe à cet endroit, il sera réutilisé automatiquement."
|
"Note : Le nouveau fichier sera téléchargé dans le répertoire courant. Si un '%s' existe à cet endroit, il sera réutilisé automatiquement."
|
||||||
|
|
||||||
#. • MSG_085
|
#. • MSG_085
|
||||||
msgid "Downloading '%s'"
|
msgid "Downloading %s"
|
||||||
msgstr "Téléchargement de '%s'"
|
msgstr "Téléchargement de %s"
|
||||||
|
|
||||||
#. • MSG_086
|
#. • MSG_086
|
||||||
msgid "No image selected"
|
msgid "No image selected"
|
||||||
|
@ -910,6 +910,62 @@ msgstr ""
|
||||||
"\n"
|
"\n"
|
||||||
"Etes-vous sûr de vouloir continuer ?"
|
"Etes-vous sûr de vouloir continuer ?"
|
||||||
|
|
||||||
|
#. • MSG_135
|
||||||
|
msgid "Version"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. • MSG_136
|
||||||
|
msgid "Release"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. • MSG_137
|
||||||
|
msgid "Edition"
|
||||||
|
msgstr "Édition"
|
||||||
|
|
||||||
|
#. • MSG_138
|
||||||
|
msgid "Language"
|
||||||
|
msgstr "Langue de produit"
|
||||||
|
|
||||||
|
#. • MSG_139
|
||||||
|
msgid "Architecture"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. • MSG_140
|
||||||
|
msgid "Continue"
|
||||||
|
msgstr "Continuer"
|
||||||
|
|
||||||
|
#. • MSG_141
|
||||||
|
msgid "Back"
|
||||||
|
msgstr "Retour"
|
||||||
|
|
||||||
|
#. • MSG_142
|
||||||
|
msgid "Please wait..."
|
||||||
|
msgstr "Veuillez patienter..."
|
||||||
|
|
||||||
|
#. • MSG_143
|
||||||
|
msgid "Download using a browser"
|
||||||
|
msgstr "Télécharger avec un navigateur"
|
||||||
|
|
||||||
|
#. • MSG_144
|
||||||
|
msgid "Temporarily banned by Microsoft for requesting too many downloads - Please try again later..."
|
||||||
|
msgstr "Temporairement banni par Microsoft pour trop de téléchargements - Veuillez réessayer plus tard..."
|
||||||
|
|
||||||
|
#. • MSG_145
|
||||||
|
msgid "PowerShell 3.0 or later is required to run this script."
|
||||||
|
msgstr "PowerShell 3.0 ou ultérieur est nécessaire pour lancer ce script."
|
||||||
|
|
||||||
|
#. • MSG_146
|
||||||
|
msgid "Do you want to go online and download it?"
|
||||||
|
msgstr "Voulez-vous aller en ligne pour le télécharger ?"
|
||||||
|
|
||||||
|
#. • MSG_148
|
||||||
|
msgid "Running download script..."
|
||||||
|
msgstr "Execution du script de téléchargement..."
|
||||||
|
|
||||||
|
#. • MSG_149
|
||||||
|
msgid "Download ISO Image"
|
||||||
|
msgstr "Télécharger une image ISO"
|
||||||
|
|
||||||
#. • MSG_150
|
#. • MSG_150
|
||||||
msgid "Type of computer you plan to use this bootable drive with. It is your responsibility to determine whether your target is of BIOS or UEFI type before you start creating the drive, as it may fail to boot otherwise."
|
msgid "Type of computer you plan to use this bootable drive with. It is your responsibility to determine whether your target is of BIOS or UEFI type before you start creating the drive, as it may fail to boot otherwise."
|
||||||
msgstr "Type d'ordinateur avec lequel vous comptez utiliser ce disque démarrable. Il est de votre responsabilité de déterminer s'il s'agit d'un type BIOS ou UEFI avant de commencer a créer votre périphérique, car il risque de ne pas démarrer sinon."
|
msgstr "Type d'ordinateur avec lequel vous comptez utiliser ce disque démarrable. Il est de votre responsabilité de déterminer s'il s'agit d'un type BIOS ou UEFI avant de commencer a créer votre périphérique, car il risque de ne pas démarrer sinon."
|
||||||
|
@ -977,8 +1033,8 @@ msgid "Method that will be used to make the drive bootable"
|
||||||
msgstr "Méthode à utiliser pour rendre le périphérique démarrable"
|
msgstr "Méthode à utiliser pour rendre le périphérique démarrable"
|
||||||
|
|
||||||
#. • MSG_165
|
#. • MSG_165
|
||||||
msgid "Click to select an image..."
|
msgid "Click to select or download an image..."
|
||||||
msgstr "Cliquez ici pour sélectionner une image..."
|
msgstr "Cliquez ici pour sélectionner ou télécharger une image..."
|
||||||
|
|
||||||
#. • MSG_166
|
#. • MSG_166
|
||||||
msgid "Check this box to allow the display of international labels and set a device icon (creates an autorun.inf)"
|
msgid "Check this box to allow the display of international labels and set a device icon (creates an autorun.inf)"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
# List of all languages included in this file (with version)
|
# List of all languages included in this file (with version)
|
||||||
# • v3.2 "en-US" "English (English)"
|
# • v3.5 "en-US" "English (English)"
|
||||||
# • v3.2 "ar-SA" "Arabic (العربية)"
|
# • v3.2 "ar-SA" "Arabic (العربية)"
|
||||||
# • v3.0 "az-AZ" "Azerbaijani (Azərbaycanca)"
|
# • v3.0 "az-AZ" "Azerbaijani (Azərbaycanca)"
|
||||||
# • v3.2 "bg-BG" "Bulgarian (Български)"
|
# • v3.2 "bg-BG" "Bulgarian (Български)"
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
# • v3.2 "da-DK" "Danish (Dansk)"
|
# • v3.2 "da-DK" "Danish (Dansk)"
|
||||||
# • v3.2 "nl-NL" "Dutch (Nederlands)"
|
# • v3.2 "nl-NL" "Dutch (Nederlands)"
|
||||||
# • v3.2 "fi-FI" "Finnish (Suomi)"
|
# • v3.2 "fi-FI" "Finnish (Suomi)"
|
||||||
# • v3.2 "fr-FR" "French (Français)"
|
# • v3.5 "fr-FR" "French (Français)"
|
||||||
# • v3.2 "de-DE" "German (Deutsch)"
|
# • v3.2 "de-DE" "German (Deutsch)"
|
||||||
# • v3.2 "el-GR" "Greek (Ελληνικά)"
|
# • v3.2 "el-GR" "Greek (Ελληνικά)"
|
||||||
# • v3.2 "he-IL" "Hebrew (עברית)"
|
# • v3.2 "he-IL" "Hebrew (עברית)"
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
l "en-US" "English (English)" 0x0409, 0x0809, 0x0c09, 0x1009, 0x1409, 0x1809, 0x1c09, 0x2009, 0x2409, 0x2809, 0x2c09, 0x3009, 0x3409, 0x3809, 0x3c09, 0x4009, 0x4409, 0x4809
|
l "en-US" "English (English)" 0x0409, 0x0809, 0x0c09, 0x1009, 0x1409, 0x1809, 0x1c09, 0x2009, 0x2409, 0x2809, 0x2c09, 0x3009, 0x3409, 0x3809, 0x3c09, 0x4009, 0x4409, 0x4809
|
||||||
v 3.2
|
v 3.5
|
||||||
|
|
||||||
g IDD_DIALOG
|
g IDD_DIALOG
|
||||||
t IDS_DRIVE_PROPERTIES_TXT "Drive Properties"
|
t IDS_DRIVE_PROPERTIES_TXT "Drive Properties"
|
||||||
|
@ -346,9 +346,12 @@ t MSG_139 "Architecture"
|
||||||
t MSG_140 "Continue"
|
t MSG_140 "Continue"
|
||||||
t MSG_141 "Back"
|
t MSG_141 "Back"
|
||||||
t MSG_142 "Please wait..."
|
t MSG_142 "Please wait..."
|
||||||
t MSG_143 "Download ISO Image"
|
t MSG_143 "Download using a browser"
|
||||||
t MSG_144 "Download using a browser"
|
t MSG_144 "Temporarily banned by Microsoft for requesting too many downloads - Please try again later..."
|
||||||
t MSG_149 "Running download script..."
|
t MSG_145 "PowerShell 3.0 or later is required to run this script."
|
||||||
|
t MSG_146 "Do you want to go online and download it?"
|
||||||
|
t MSG_148 "Running download script..."
|
||||||
|
t MSG_149 "Download ISO Image"
|
||||||
t MSG_150 "Type of computer you plan to use this bootable drive with. It is your responsibility to determine whether "
|
t MSG_150 "Type of computer you plan to use this bootable drive with. It is your responsibility to determine whether "
|
||||||
"your target is of BIOS or UEFI type before you start creating the drive, as it may fail to boot otherwise."
|
"your target is of BIOS or UEFI type before you start creating the drive, as it may fail to boot otherwise."
|
||||||
# You shouldn't translate 'Legacy Mode' as this is an option that usually appears in English in the UEFI settings.
|
# You shouldn't translate 'Legacy Mode' as this is an option that usually appears in English in the UEFI settings.
|
||||||
|
@ -4093,7 +4096,7 @@ t MSG_306 "Pikanollataan asemaa: %0.1f%% suoritettu"
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
l "fr-FR" "French (Français)" 0x040c, 0x080c, 0x0c0c, 0x100c, 0x140c, 0x180c, 0x1c0c, 0x200c, 0x240c, 0x280c, 0x2c0c, 0x300c, 0x340c, 0x380c, 0xe40c
|
l "fr-FR" "French (Français)" 0x040c, 0x080c, 0x0c0c, 0x100c, 0x140c, 0x180c, 0x1c0c, 0x200c, 0x240c, 0x280c, 0x2c0c, 0x300c, 0x340c, 0x380c, 0xe40c
|
||||||
v 3.2
|
v 3.5
|
||||||
b "en-US"
|
b "en-US"
|
||||||
|
|
||||||
g IDD_ABOUTBOX
|
g IDD_ABOUTBOX
|
||||||
|
@ -4288,9 +4291,12 @@ t MSG_138 "Langue de produit"
|
||||||
t MSG_140 "Continuer"
|
t MSG_140 "Continuer"
|
||||||
t MSG_141 "Retour"
|
t MSG_141 "Retour"
|
||||||
t MSG_142 "Veuillez patienter..."
|
t MSG_142 "Veuillez patienter..."
|
||||||
t MSG_143 "Télécharger une image ISO"
|
t MSG_143 "Télécharger avec un navigateur"
|
||||||
t MSG_144 "Télécharger avec un navigateur"
|
t MSG_144 "Temporairement banni par Microsoft pour trop de téléchargements - Veuillez réessayer plus tard..."
|
||||||
t MSG_149 "Execution du script de téléchargement..."
|
t MSG_145 "PowerShell 3.0 ou ultérieur est nécessaire pour lancer ce script."
|
||||||
|
t MSG_146 "Voulez-vous aller en ligne pour le télécharger ?"
|
||||||
|
t MSG_148 "Execution du script de téléchargement..."
|
||||||
|
t MSG_149 "Télécharger une image ISO"
|
||||||
t MSG_150 "Type d'ordinateur avec lequel vous comptez utiliser ce disque démarrable. Il est de votre responsabilité de déterminer s'il s'agit d'un type BIOS ou UEFI avant de commencer a créer votre périphérique, car il risque de ne pas démarrer sinon."
|
t MSG_150 "Type d'ordinateur avec lequel vous comptez utiliser ce disque démarrable. Il est de votre responsabilité de déterminer s'il s'agit d'un type BIOS ou UEFI avant de commencer a créer votre périphérique, car il risque de ne pas démarrer sinon."
|
||||||
t MSG_151 "'UEFI-CSM' signifie que le périphérique démarrera seulement en mode émulation BIOS (i.e. 'Legacy Mode') sous UEFI, et non pas en mode UEFI natif."
|
t MSG_151 "'UEFI-CSM' signifie que le périphérique démarrera seulement en mode émulation BIOS (i.e. 'Legacy Mode') sous UEFI, et non pas en mode UEFI natif."
|
||||||
t MSG_152 "'non CSM' signifie que le périphérique démarrera seulement en mode UEFI natif, et non pas en mode émulation BIOS (i.e. 'Legacy Mode')."
|
t MSG_152 "'non CSM' signifie que le périphérique démarrera seulement en mode UEFI natif, et non pas en mode émulation BIOS (i.e. 'Legacy Mode')."
|
||||||
|
|
118
src/net.c
118
src/net.c
|
@ -234,7 +234,7 @@ static char* GetShortName(const char* url)
|
||||||
if (len < 5)
|
if (len < 5)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (i = len - 1; i > 0; i--) {
|
for (i = len - 2; i > 0; i--) {
|
||||||
if (url[i] == '/') {
|
if (url[i] == '/') {
|
||||||
i++;
|
i++;
|
||||||
break;
|
break;
|
||||||
|
@ -306,8 +306,10 @@ out:
|
||||||
* If hProgressDialog is not NULL, this function will send INIT and EXIT messages
|
* If hProgressDialog is not NULL, this function will send INIT and EXIT messages
|
||||||
* to the dialog in question, with WPARAM being set to nonzero for EXIT on success
|
* to the dialog in question, with WPARAM being set to nonzero for EXIT on success
|
||||||
* and also attempt to indicate progress using an IDC_PROGRESS control
|
* and also attempt to indicate progress using an IDC_PROGRESS control
|
||||||
|
* Note that when a buffer is used, the actual size of the buffer is one more than its reported
|
||||||
|
* size (with the extra byte set to 0) to accomodate for calls that need a NUL-terminated buffer.
|
||||||
*/
|
*/
|
||||||
static uint64_t DownloadToFileOrBuffer(const char* url, const char* file, BYTE** buffer, HWND hProgressDialog, BOOL bTaskBarProgress)
|
uint64_t DownloadToFileOrBuffer(const char* url, const char* file, BYTE** buffer, HWND hProgressDialog, BOOL bTaskBarProgress)
|
||||||
{
|
{
|
||||||
const char* accept_types[] = {"*/*\0", NULL};
|
const char* accept_types[] = {"*/*\0", NULL};
|
||||||
const char* short_name;
|
const char* short_name;
|
||||||
|
@ -344,6 +346,7 @@ static uint64_t DownloadToFileOrBuffer(const char* url, const char* file, BYTE**
|
||||||
// Use the progress control provided, if any
|
// Use the progress control provided, if any
|
||||||
hProgressBar = GetDlgItem(hProgressDialog, IDC_PROGRESS);
|
hProgressBar = GetDlgItem(hProgressDialog, IDC_PROGRESS);
|
||||||
if (hProgressBar != NULL) {
|
if (hProgressBar != NULL) {
|
||||||
|
SendMessage(hProgressBar, PBM_SETSTATE, (WPARAM)PBST_NORMAL, 0);
|
||||||
SendMessage(hProgressBar, PBM_SETMARQUEE, FALSE, 0);
|
SendMessage(hProgressBar, PBM_SETMARQUEE, FALSE, 0);
|
||||||
SendMessage(hProgressBar, PBM_SETPOS, 0, 0);
|
SendMessage(hProgressBar, PBM_SETPOS, 0, 0);
|
||||||
}
|
}
|
||||||
|
@ -427,7 +430,8 @@ static uint64_t DownloadToFileOrBuffer(const char* url, const char* file, BYTE**
|
||||||
uprintf("No buffer pointer provided for download");
|
uprintf("No buffer pointer provided for download");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
*buffer = malloc((size_t)total_size);
|
// Allocate one extra byte, so that caller can rely on NUL-terminated text if needed
|
||||||
|
*buffer = calloc((size_t)total_size + 1, 1);
|
||||||
if (*buffer == NULL) {
|
if (*buffer == NULL) {
|
||||||
uprintf("Could not allocate buffer for download");
|
uprintf("Could not allocate buffer for download");
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -526,6 +530,8 @@ DWORD DownloadSignedFile(const char* url, const char* file, HWND hProgressDialog
|
||||||
uprintf("FATAL: Download signature is invalid ✗");
|
uprintf("FATAL: Download signature is invalid ✗");
|
||||||
DownloadStatus = 403; // Forbidden
|
DownloadStatus = 403; // Forbidden
|
||||||
FormatStatus = ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | APPERR(ERROR_BAD_SIGNATURE);
|
FormatStatus = ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | APPERR(ERROR_BAD_SIGNATURE);
|
||||||
|
SendMessage(GetDlgItem(hProgressDialog, IDC_PROGRESS), PBM_SETSTATE, (WPARAM)PBST_ERROR, 0);
|
||||||
|
SetTaskbarProgressState(TASKBAR_ERROR);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -866,7 +872,7 @@ BOOL CheckForUpdates(BOOL force)
|
||||||
*/
|
*/
|
||||||
static DWORD WINAPI DownloadISOThread(LPVOID param)
|
static DWORD WINAPI DownloadISOThread(LPVOID param)
|
||||||
{
|
{
|
||||||
char cmdline[512], locale_str[1024], pipe[64] = "\\\\.\\pipe\\";
|
char locale_str[1024], cmdline[sizeof(locale_str) + 512], pipe[64] = "\\\\.\\pipe\\";
|
||||||
char powershell_path[MAX_PATH], icon_path[MAX_PATH] = "", script_path[MAX_PATH] = "";
|
char powershell_path[MAX_PATH], icon_path[MAX_PATH] = "", script_path[MAX_PATH] = "";
|
||||||
char *url = NULL, sig_url[128];
|
char *url = NULL, sig_url[128];
|
||||||
BYTE *sig = NULL;
|
BYTE *sig = NULL;
|
||||||
|
@ -879,7 +885,7 @@ static DWORD WINAPI DownloadISOThread(LPVOID param)
|
||||||
// Use a GUID as random unique string, else ill-intentioned security "researchers"
|
// Use a GUID as random unique string, else ill-intentioned security "researchers"
|
||||||
// may either spam our pipe or replace our script to fool antivirus solutions into
|
// may either spam our pipe or replace our script to fool antivirus solutions into
|
||||||
// thinking that Rufus is doing something malicious...
|
// thinking that Rufus is doing something malicious...
|
||||||
CoCreateGuid(&guid);
|
IGNORE_RETVAL(CoCreateGuid(&guid));
|
||||||
strcpy(&pipe[9], GuidToString(&guid));
|
strcpy(&pipe[9], GuidToString(&guid));
|
||||||
static_sprintf(icon_path, "%s%s.ico", temp_dir, APPLICATION_NAME);
|
static_sprintf(icon_path, "%s%s.ico", temp_dir, APPLICATION_NAME);
|
||||||
ExtractAppIcon(icon_path, TRUE);
|
ExtractAppIcon(icon_path, TRUE);
|
||||||
|
@ -892,7 +898,7 @@ static DWORD WINAPI DownloadISOThread(LPVOID param)
|
||||||
static_strcpy(script_path, "D:\\Projects\\Fido\\Fido.ps1");
|
static_strcpy(script_path, "D:\\Projects\\Fido\\Fido.ps1");
|
||||||
#else
|
#else
|
||||||
// If we don't have the script, download it
|
// If we don't have the script, download it
|
||||||
if (fido_len == 0) {
|
if (fido_script == NULL) {
|
||||||
fido_len = (DWORD)DownloadToFileOrBuffer(fido_url, NULL, &fido_script, hMainDialog, FALSE);
|
fido_len = (DWORD)DownloadToFileOrBuffer(fido_url, NULL, &fido_script, hMainDialog, FALSE);
|
||||||
if (fido_len == 0)
|
if (fido_len == 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -900,6 +906,10 @@ static DWORD WINAPI DownloadISOThread(LPVOID param)
|
||||||
dwSize = (DWORD)DownloadToFileOrBuffer(sig_url, NULL, &sig, NULL, FALSE);
|
dwSize = (DWORD)DownloadToFileOrBuffer(sig_url, NULL, &sig, NULL, FALSE);
|
||||||
if ((dwSize != RSA_SIGNATURE_SIZE) || (!ValidateOpensslSignature(fido_script, fido_len, sig, dwSize))) {
|
if ((dwSize != RSA_SIGNATURE_SIZE) || (!ValidateOpensslSignature(fido_script, fido_len, sig, dwSize))) {
|
||||||
uprintf("FATAL: Signature is invalid ✗");
|
uprintf("FATAL: Signature is invalid ✗");
|
||||||
|
FormatStatus = ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | APPERR(ERROR_BAD_SIGNATURE);
|
||||||
|
SendMessage(hProgress, PBM_SETSTATE, (WPARAM)PBST_ERROR, 0);
|
||||||
|
SetTaskbarProgressState(TASKBAR_ERROR);
|
||||||
|
safe_free(fido_script);
|
||||||
free(sig);
|
free(sig);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -910,7 +920,7 @@ static DWORD WINAPI DownloadISOThread(LPVOID param)
|
||||||
SetTaskbarProgressValue(0, MAX_PROGRESS);
|
SetTaskbarProgressValue(0, MAX_PROGRESS);
|
||||||
SendMessage(hProgress, PBM_SETPOS, 0, 0);
|
SendMessage(hProgress, PBM_SETPOS, 0, 0);
|
||||||
}
|
}
|
||||||
PrintInfo(0, MSG_149);
|
PrintInfo(0, MSG_148);
|
||||||
|
|
||||||
assert((fido_script != NULL) && (fido_len != 0));
|
assert((fido_script != NULL) && (fido_len != 0));
|
||||||
|
|
||||||
|
@ -928,11 +938,11 @@ static DWORD WINAPI DownloadISOThread(LPVOID param)
|
||||||
safe_closehandle(hFile);
|
safe_closehandle(hFile);
|
||||||
#endif
|
#endif
|
||||||
static_sprintf(powershell_path, "%s\\WindowsPowerShell\\v1.0\\powershell.exe", system_dir);
|
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",
|
static_sprintf(locale_str, "%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),
|
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_138), lmprintf(MSG_139), lmprintf(MSG_040), lmprintf(MSG_140), lmprintf(MSG_141),
|
||||||
lmprintf(MSG_141), lmprintf(MSG_006), lmprintf(MSG_007), lmprintf(MSG_042),
|
lmprintf(MSG_006), lmprintf(MSG_007), lmprintf(MSG_042), lmprintf(MSG_142), lmprintf(MSG_143),
|
||||||
lmprintf(MSG_142), lmprintf(MSG_143));
|
lmprintf(MSG_144), lmprintf(MSG_145), lmprintf(MSG_146));
|
||||||
|
|
||||||
hPipe = CreateNamedPipeA(pipe, PIPE_ACCESS_INBOUND,
|
hPipe = CreateNamedPipeA(pipe, PIPE_ACCESS_INBOUND,
|
||||||
PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES,
|
PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES,
|
||||||
|
@ -942,9 +952,9 @@ static DWORD WINAPI DownloadISOThread(LPVOID param)
|
||||||
}
|
}
|
||||||
|
|
||||||
static_sprintf(cmdline, "%s -NonInteractive -Sta -NoProfile –ExecutionPolicy Bypass "
|
static_sprintf(cmdline, "%s -NonInteractive -Sta -NoProfile –ExecutionPolicy Bypass "
|
||||||
"-File %s -PipeName %s -LocData \"%s\" -Icon %s -AppTitle \"%s\"",
|
"-File %s -DisableFirstRunCustomize -PipeName %s -LocData \"%s\" -Icon %s -AppTitle \"%s\"",
|
||||||
powershell_path, script_path, &pipe[9], locale_str, icon_path, lmprintf(MSG_143));
|
powershell_path, script_path, &pipe[9], locale_str, icon_path, lmprintf(MSG_149));
|
||||||
// Signal our Windows alerts hook that it should close the IE cookie prompts from Fido
|
// Signal our Windows alert hook that it should close the IE cookie prompts from Fido
|
||||||
close_fido_cookie_prompts = TRUE;
|
close_fido_cookie_prompts = TRUE;
|
||||||
FormatStatus = RunCommand(cmdline, app_dir, TRUE);
|
FormatStatus = RunCommand(cmdline, app_dir, TRUE);
|
||||||
close_fido_cookie_prompts = FALSE;
|
close_fido_cookie_prompts = FALSE;
|
||||||
|
@ -1008,8 +1018,6 @@ BOOL DownloadISO()
|
||||||
SendMessage(hMainDialog, UM_ENABLE_CONTROLS, 0, 0);
|
SendMessage(hMainDialog, UM_ENABLE_CONTROLS, 0, 0);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
// TODO: Can we locate our modal Window and position it/set it on top?
|
|
||||||
// TODO: Send close message to Fido if the user closes Rufus
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1083,81 +1091,3 @@ out:
|
||||||
|
|
||||||
return (dwTotalSize > 0);
|
return (dwTotalSize > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resolve an HTTP 301/302 redirect (for a *SINGLE* level)
|
|
||||||
// If no redirect is in effect, or if there is an error, the original URL is returned
|
|
||||||
const char* ResolveRedirect(const char* url)
|
|
||||||
{
|
|
||||||
static char ret_url[128];
|
|
||||||
const char* accept_types[] = { "*/*\0", NULL };
|
|
||||||
char hostname[64], urlpath[128];
|
|
||||||
BOOL r = FALSE;
|
|
||||||
DWORD dwSize;
|
|
||||||
HINTERNET hSession = NULL, hConnection = NULL, hRequest = NULL;
|
|
||||||
URL_COMPONENTSA UrlParts = { sizeof(URL_COMPONENTSA), NULL, 1, (INTERNET_SCHEME)0,
|
|
||||||
hostname, sizeof(hostname), 0, NULL, 1, urlpath, sizeof(urlpath), NULL, 1 };
|
|
||||||
|
|
||||||
PF_TYPE_DECL(WINAPI, BOOL, InternetCrackUrlA, (LPCSTR, DWORD, DWORD, LPURL_COMPONENTSA));
|
|
||||||
PF_TYPE_DECL(WINAPI, HINTERNET, InternetConnectA, (HINTERNET, LPCSTR, INTERNET_PORT, LPCSTR, LPCSTR, DWORD, DWORD, DWORD_PTR));
|
|
||||||
PF_TYPE_DECL(WINAPI, BOOL, InternetReadFile, (HINTERNET, LPVOID, DWORD, LPDWORD));
|
|
||||||
PF_TYPE_DECL(WINAPI, BOOL, InternetCloseHandle, (HINTERNET));
|
|
||||||
PF_TYPE_DECL(WINAPI, HINTERNET, HttpOpenRequestA, (HINTERNET, LPCSTR, LPCSTR, LPCSTR, LPCSTR, LPCSTR*, DWORD, DWORD_PTR));
|
|
||||||
PF_TYPE_DECL(WINAPI, BOOL, HttpSendRequestA, (HINTERNET, LPCSTR, DWORD, LPVOID, DWORD));
|
|
||||||
PF_TYPE_DECL(WINAPI, BOOL, HttpQueryInfoA, (HINTERNET, DWORD, LPVOID, LPDWORD, LPDWORD));
|
|
||||||
PF_INIT_OR_OUT(InternetCrackUrlA, WinInet);
|
|
||||||
PF_INIT_OR_OUT(InternetConnectA, WinInet);
|
|
||||||
PF_INIT_OR_OUT(InternetReadFile, WinInet);
|
|
||||||
PF_INIT_OR_OUT(InternetCloseHandle, WinInet);
|
|
||||||
PF_INIT_OR_OUT(HttpOpenRequestA, WinInet);
|
|
||||||
PF_INIT_OR_OUT(HttpSendRequestA, WinInet);
|
|
||||||
PF_INIT_OR_OUT(HttpQueryInfoA, WinInet);
|
|
||||||
|
|
||||||
if (url == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
if ((!pfInternetCrackUrlA(url, (DWORD)safe_strlen(url), 0, &UrlParts))
|
|
||||||
|| (UrlParts.lpszHostName == NULL) || (UrlParts.lpszUrlPath == NULL))
|
|
||||||
goto out;
|
|
||||||
hostname[sizeof(hostname) - 1] = 0;
|
|
||||||
|
|
||||||
hSession = GetInternetSession(FALSE);
|
|
||||||
if (hSession == NULL)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
hConnection = pfInternetConnectA(hSession, UrlParts.lpszHostName, UrlParts.nPort, NULL, NULL, INTERNET_SERVICE_HTTP, 0, (DWORD_PTR)NULL);
|
|
||||||
if (hConnection == NULL)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
hRequest = pfHttpOpenRequestA(hConnection, "GET", UrlParts.lpszUrlPath, NULL, NULL, accept_types,
|
|
||||||
INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP | INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS | INTERNET_FLAG_NO_AUTO_REDIRECT |
|
|
||||||
INTERNET_FLAG_NO_COOKIES | INTERNET_FLAG_NO_UI | INTERNET_FLAG_HYPERLINK |
|
|
||||||
((UrlParts.nScheme == INTERNET_SCHEME_HTTPS) ? INTERNET_FLAG_SECURE : 0), (DWORD_PTR)NULL);
|
|
||||||
if (hRequest == NULL)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
if (!pfHttpSendRequestA(hRequest, NULL, 0, NULL, 0))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
DownloadStatus = 404;
|
|
||||||
dwSize = sizeof(DownloadStatus);
|
|
||||||
pfHttpQueryInfoA(hRequest, HTTP_QUERY_STATUS_CODE | HTTP_QUERY_FLAG_NUMBER, (LPVOID)&DownloadStatus, &dwSize, NULL);
|
|
||||||
switch (DownloadStatus) {
|
|
||||||
case 301:
|
|
||||||
case 302:
|
|
||||||
dwSize = sizeof(ret_url);
|
|
||||||
r = (pfHttpQueryInfoA(hRequest, HTTP_QUERY_LOCATION, (LPVOID)ret_url, &dwSize, NULL) && (dwSize > 0));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
|
||||||
if (hRequest)
|
|
||||||
pfInternetCloseHandle(hRequest);
|
|
||||||
if (hConnection)
|
|
||||||
pfInternetCloseHandle(hConnection);
|
|
||||||
if (hSession)
|
|
||||||
pfInternetCloseHandle(hSession);
|
|
||||||
|
|
||||||
return r ? ret_url : url;
|
|
||||||
}
|
|
||||||
|
|
|
@ -907,7 +907,7 @@ void parse_update(char* buf, size_t len)
|
||||||
char *arch_names[CPU_ARCH_MAX] = { "x86", "x64", "arm", "arm64", "none" };
|
char *arch_names[CPU_ARCH_MAX] = { "x86", "x64", "arm", "arm64", "none" };
|
||||||
|
|
||||||
// strchr includes the NUL terminator in the search, so take care of backslash before NUL
|
// strchr includes the NUL terminator in the search, so take care of backslash before NUL
|
||||||
if ((buf == NULL) || (len < 2) || (len > 65536) || (buf[len-1] != 0) || (buf[len-2] == '\\'))
|
if ((buf == NULL) || (len < 2) || (len > 64 * KB) || (buf[len-1] != 0) || (buf[len-2] == '\\'))
|
||||||
return;
|
return;
|
||||||
// Sanitize the data - Not a silver bullet, but it helps
|
// Sanitize the data - Not a silver bullet, but it helps
|
||||||
len = safe_strlen(buf)+1; // Someone may be inserting NULs
|
len = safe_strlen(buf)+1; // Someone may be inserting NULs
|
||||||
|
|
16
src/rufus.c
16
src/rufus.c
|
@ -117,7 +117,7 @@ char embedded_sl_version_str[2][12] = { "?.??", "?.??" };
|
||||||
char embedded_sl_version_ext[2][32];
|
char embedded_sl_version_ext[2][32];
|
||||||
char ClusterSizeLabel[MAX_CLUSTER_SIZES][64];
|
char ClusterSizeLabel[MAX_CLUSTER_SIZES][64];
|
||||||
char msgbox[1024], msgbox_title[32], *ini_file = NULL, *image_path = NULL, *short_image_path;
|
char msgbox[1024], msgbox_title[32], *ini_file = NULL, *image_path = NULL, *short_image_path;
|
||||||
char image_option_txt[128], fido_url[128];
|
char image_option_txt[128], *fido_url = NULL;
|
||||||
StrArray DriveID, DriveLabel, DriveHub, BlockingProcess, ImageList;
|
StrArray DriveID, DriveLabel, DriveHub, BlockingProcess, ImageList;
|
||||||
// Number of steps for each FS for FCC_STRUCTURE_PROGRESS
|
// Number of steps for each FS for FCC_STRUCTURE_PROGRESS
|
||||||
const int nb_steps[FS_MAX] = { 5, 5, 12, 1, 10 };
|
const int nb_steps[FS_MAX] = { 5, 5, 12, 1, 10 };
|
||||||
|
@ -1880,7 +1880,6 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
#ifdef RUFUS_TEST
|
#ifdef RUFUS_TEST
|
||||||
if (LOWORD(wParam) == IDC_TEST) {
|
if (LOWORD(wParam) == IDC_TEST) {
|
||||||
uprintf("%s -> %s", FIDO_BASE, ResolveRedirect(FIDO_BASE));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2264,10 +2263,17 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
||||||
KillTimer(hMainDialog, TID_APP_TIMER);
|
KillTimer(hMainDialog, TID_APP_TIMER);
|
||||||
if (!IS_ERROR(FormatStatus))
|
if (!IS_ERROR(FormatStatus))
|
||||||
PrintInfo(0, MSG_210);
|
PrintInfo(0, MSG_210);
|
||||||
else if (SCODE_CODE(FormatStatus))
|
else switch (SCODE_CODE(FormatStatus)) {
|
||||||
|
case ERROR_CANCELLED:
|
||||||
PrintInfo(0, MSG_211);
|
PrintInfo(0, MSG_211);
|
||||||
else
|
break;
|
||||||
|
case ERROR_BAD_SIGNATURE:
|
||||||
|
PrintInfo(0, MSG_283);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
PrintInfo(0, MSG_212);
|
PrintInfo(0, MSG_212);
|
||||||
|
break;
|
||||||
|
}
|
||||||
EnableControls(TRUE);
|
EnableControls(TRUE);
|
||||||
break;
|
break;
|
||||||
case UM_TIMER_START:
|
case UM_TIMER_START:
|
||||||
|
@ -3114,6 +3120,7 @@ relaunch:
|
||||||
image_options = IMOP_WINTOGO;
|
image_options = IMOP_WINTOGO;
|
||||||
image_option_txt[0] = 0;
|
image_option_txt[0] = 0;
|
||||||
select_index = 0;
|
select_index = 0;
|
||||||
|
safe_free(fido_url);
|
||||||
enable_fido = FALSE;
|
enable_fido = FALSE;
|
||||||
SetProcessDefaultLayout(right_to_left_mode?LAYOUT_RTL:0);
|
SetProcessDefaultLayout(right_to_left_mode?LAYOUT_RTL:0);
|
||||||
if (get_loc_data_file(loc_file, selected_locale))
|
if (get_loc_data_file(loc_file, selected_locale))
|
||||||
|
@ -3407,6 +3414,7 @@ out:
|
||||||
safe_free(update.download_url);
|
safe_free(update.download_url);
|
||||||
safe_free(update.release_notes);
|
safe_free(update.release_notes);
|
||||||
safe_free(grub2_buf);
|
safe_free(grub2_buf);
|
||||||
|
safe_free(fido_url);
|
||||||
safe_free(fido_script);
|
safe_free(fido_script);
|
||||||
if (argv != NULL) {
|
if (argv != NULL) {
|
||||||
for (i=0; i<argc; i++) safe_free(argv[i]);
|
for (i=0; i<argc; i++) safe_free(argv[i]);
|
||||||
|
|
|
@ -104,8 +104,7 @@
|
||||||
#endif
|
#endif
|
||||||
#define DOWNLOAD_URL RUFUS_URL "/downloads"
|
#define DOWNLOAD_URL RUFUS_URL "/downloads"
|
||||||
#define FILES_URL RUFUS_URL "/files"
|
#define FILES_URL RUFUS_URL "/files"
|
||||||
#define FIDO_BASE "https://github.com/pbatard/Fido/releases/latest"
|
#define FIDO_VERSION "v1"
|
||||||
#define FIDO_NAME "Fido.ps1"
|
|
||||||
#define SECURE_BOOT_MORE_INFO_URL "https://github.com/pbatard/rufus/wiki/FAQ#Why_do_I_need_to_disable_Secure_Boot_to_use_UEFINTFS"
|
#define SECURE_BOOT_MORE_INFO_URL "https://github.com/pbatard/rufus/wiki/FAQ#Why_do_I_need_to_disable_Secure_Boot_to_use_UEFINTFS"
|
||||||
#define WPPRECORDER_MORE_INFO_URL "https://github.com/pbatard/rufus/wiki/FAQ#BSODs_with_Windows_To_Go_drives_created_from_Windows_10_1809_ISOs"
|
#define WPPRECORDER_MORE_INFO_URL "https://github.com/pbatard/rufus/wiki/FAQ#BSODs_with_Windows_To_Go_drives_created_from_Windows_10_1809_ISOs"
|
||||||
#define SEVENZIP_URL "https://www.7-zip.org"
|
#define SEVENZIP_URL "https://www.7-zip.org"
|
||||||
|
@ -459,9 +458,8 @@ extern int nWindowsVersion, nWindowsBuildNumber, dialog_showing;
|
||||||
extern int fs, bt, pt, tt;
|
extern int fs, bt, pt, tt;
|
||||||
extern unsigned long syslinux_ldlinux_len[2];
|
extern unsigned long syslinux_ldlinux_len[2];
|
||||||
extern char WindowsVersionStr[128], ubuffer[UBUFFER_SIZE], embedded_sl_version_str[2][12];
|
extern char WindowsVersionStr[128], ubuffer[UBUFFER_SIZE], embedded_sl_version_str[2][12];
|
||||||
extern char szFolderPath[MAX_PATH], app_dir[MAX_PATH], temp_dir[MAX_PATH], system_dir[MAX_PATH];
|
extern char szFolderPath[MAX_PATH], app_dir[MAX_PATH], temp_dir[MAX_PATH], system_dir[MAX_PATH], sysnative_dir[MAX_PATH];
|
||||||
extern char sysnative_dir[MAX_PATH], fido_url[128];
|
extern char *image_path, *fido_url;
|
||||||
extern char* image_path;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Shared prototypes
|
* Shared prototypes
|
||||||
|
@ -523,6 +521,7 @@ extern BOOL ResetDevice(int index);
|
||||||
extern BOOL GetOpticalMedia(IMG_SAVE* img_save);
|
extern BOOL GetOpticalMedia(IMG_SAVE* img_save);
|
||||||
extern BOOL SetLGP(BOOL bRestore, BOOL* bExistingKey, const char* szPath, const char* szPolicy, DWORD dwValue);
|
extern BOOL SetLGP(BOOL bRestore, BOOL* bExistingKey, const char* szPath, const char* szPolicy, DWORD dwValue);
|
||||||
extern LONG GetEntryWidth(HWND hDropDown, const char* entry);
|
extern LONG GetEntryWidth(HWND hDropDown, const char* entry);
|
||||||
|
extern uint64_t DownloadToFileOrBuffer(const char* url, const char* file, BYTE** buffer, HWND hProgressDialog, BOOL bTaskBarProgress);
|
||||||
extern DWORD DownloadSignedFile(const char* url, const char* file, HWND hProgressDialog, BOOL PromptOnError);
|
extern DWORD DownloadSignedFile(const char* url, const char* file, HWND hProgressDialog, BOOL PromptOnError);
|
||||||
extern HANDLE DownloadSignedFileThreaded(const char* url, const char* file, HWND hProgressDialog, BOOL bPromptOnError);
|
extern HANDLE DownloadSignedFileThreaded(const char* url, const char* file, HWND hProgressDialog, BOOL bPromptOnError);
|
||||||
extern INT_PTR CALLBACK UpdateCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
extern INT_PTR CALLBACK UpdateCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
IDD_DIALOG DIALOGEX 12, 12, 232, 326
|
IDD_DIALOG DIALOGEX 12, 12, 232, 326
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_ACCEPTFILES
|
EXSTYLE WS_EX_ACCEPTFILES
|
||||||
CAPTION "Rufus 3.5.1455"
|
CAPTION "Rufus 3.5.1456"
|
||||||
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
||||||
|
@ -394,8 +394,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 3,5,1455,0
|
FILEVERSION 3,5,1456,0
|
||||||
PRODUCTVERSION 3,5,1455,0
|
PRODUCTVERSION 3,5,1456,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -413,13 +413,13 @@ BEGIN
|
||||||
VALUE "Comments", "https://akeo.ie"
|
VALUE "Comments", "https://akeo.ie"
|
||||||
VALUE "CompanyName", "Akeo Consulting"
|
VALUE "CompanyName", "Akeo Consulting"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "3.5.1455"
|
VALUE "FileVersion", "3.5.1456"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2019 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2019 Pete Batard (GPL v3)"
|
||||||
VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html"
|
VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html"
|
||||||
VALUE "OriginalFilename", "rufus-3.5.exe"
|
VALUE "OriginalFilename", "rufus-3.5.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "3.5.1455"
|
VALUE "ProductVersion", "3.5.1456"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
39
src/stdfn.c
39
src/stdfn.c
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <sddl.h>
|
#include <sddl.h>
|
||||||
|
#include <gpedit.h>
|
||||||
|
|
||||||
#include "rufus.h"
|
#include "rufus.h"
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
|
@ -685,40 +686,6 @@ BOOL IsFontAvailable(const char* font_name)
|
||||||
/*
|
/*
|
||||||
* Set or restore a Local Group Policy DWORD key indexed by szPath/SzPolicy
|
* Set or restore a Local Group Policy DWORD key indexed by szPath/SzPolicy
|
||||||
*/
|
*/
|
||||||
#pragma push_macro("INTERFACE")
|
|
||||||
#undef INTERFACE
|
|
||||||
#define INTERFACE IGroupPolicyObject
|
|
||||||
#define REGISTRY_EXTENSION_GUID { 0x35378EACL, 0x683F, 0x11D2, {0xA8, 0x9A, 0x00, 0xC0, 0x4F, 0xBB, 0xCF, 0xA2} }
|
|
||||||
#define GPO_OPEN_LOAD_REGISTRY 1
|
|
||||||
#define GPO_SECTION_MACHINE 2
|
|
||||||
typedef enum _GROUP_POLICY_OBJECT_TYPE {
|
|
||||||
GPOTypeLocal = 0, GPOTypeRemote, GPOTypeDS
|
|
||||||
} GROUP_POLICY_OBJECT_TYPE, *PGROUP_POLICY_OBJECT_TYPE;
|
|
||||||
DECLARE_INTERFACE_(IGroupPolicyObject, IUnknown) {
|
|
||||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
|
||||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
|
||||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
|
||||||
STDMETHOD(New) (THIS_ LPOLESTR pszDomainName, LPOLESTR pszDisplayName, DWORD dwFlags) PURE;
|
|
||||||
STDMETHOD(OpenDSGPO) (THIS_ LPOLESTR pszPath, DWORD dwFlags) PURE;
|
|
||||||
STDMETHOD(OpenLocalMachineGPO) (THIS_ DWORD dwFlags) PURE;
|
|
||||||
STDMETHOD(OpenRemoteMachineGPO) (THIS_ LPOLESTR pszComputerName, DWORD dwFlags) PURE;
|
|
||||||
STDMETHOD(Save) (THIS_ BOOL bMachine, BOOL bAdd,GUID *pGuidExtension, GUID *pGuid) PURE;
|
|
||||||
STDMETHOD(Delete) (THIS) PURE;
|
|
||||||
STDMETHOD(GetName) (THIS_ LPOLESTR pszName, int cchMaxLength) PURE;
|
|
||||||
STDMETHOD(GetDisplayName) (THIS_ LPOLESTR pszName, int cchMaxLength) PURE;
|
|
||||||
STDMETHOD(SetDisplayName) (THIS_ LPOLESTR pszName) PURE;
|
|
||||||
STDMETHOD(GetPath) (THIS_ LPOLESTR pszPath, int cchMaxPath) PURE;
|
|
||||||
STDMETHOD(GetDSPath) (THIS_ DWORD dwSection, LPOLESTR pszPath ,int cchMaxPath) PURE;
|
|
||||||
STDMETHOD(GetFileSysPath) (THIS_ DWORD dwSection, LPOLESTR pszPath, int cchMaxPath) PURE;
|
|
||||||
STDMETHOD(GetRegistryKey) (THIS_ DWORD dwSection, HKEY *hKey) PURE;
|
|
||||||
STDMETHOD(GetOptions) (THIS_ DWORD *dwOptions) PURE;
|
|
||||||
STDMETHOD(SetOptions) (THIS_ DWORD dwOptions, DWORD dwMask) PURE;
|
|
||||||
STDMETHOD(GetType) (THIS_ GROUP_POLICY_OBJECT_TYPE *gpoType) PURE;
|
|
||||||
STDMETHOD(GetMachineName) (THIS_ LPOLESTR pszName, int cchMaxLength) PURE;
|
|
||||||
STDMETHOD(GetPropertySheetPages) (THIS_ HPROPSHEETPAGE **hPages, UINT *uPageCount) PURE;
|
|
||||||
};
|
|
||||||
typedef IGroupPolicyObject *LPGROUPPOLICYOBJECT;
|
|
||||||
|
|
||||||
// I've seen rare cases where pLGPO->lpVtbl->Save(...) gets stuck, which prevents the
|
// I've seen rare cases where pLGPO->lpVtbl->Save(...) gets stuck, which prevents the
|
||||||
// application from launching altogether. To alleviate this, use a thread that we can
|
// application from launching altogether. To alleviate this, use a thread that we can
|
||||||
// terminate if needed...
|
// terminate if needed...
|
||||||
|
@ -740,7 +707,7 @@ DWORD WINAPI SetLGPThread(LPVOID param)
|
||||||
// Along with global 'existing_key', this static value is used to restore initial state
|
// Along with global 'existing_key', this static value is used to restore initial state
|
||||||
static DWORD original_val;
|
static DWORD original_val;
|
||||||
HKEY path_key = NULL, policy_key = NULL;
|
HKEY path_key = NULL, policy_key = NULL;
|
||||||
// MSVC is finicky about these ones => redefine them
|
// MSVC is finicky about these ones even if you link against gpedit.lib => redefine them
|
||||||
const IID my_IID_IGroupPolicyObject =
|
const IID my_IID_IGroupPolicyObject =
|
||||||
{ 0xea502723L, 0xa23d, 0x11d1, { 0xa7, 0xd3, 0x0, 0x0, 0xf8, 0x75, 0x71, 0xe3 } };
|
{ 0xea502723L, 0xa23d, 0x11d1, { 0xa7, 0xd3, 0x0, 0x0, 0xf8, 0x75, 0x71, 0xe3 } };
|
||||||
const IID my_CLSID_GroupPolicyObject =
|
const IID my_CLSID_GroupPolicyObject =
|
||||||
|
@ -771,7 +738,6 @@ DWORD WINAPI SetLGPThread(LPVOID param)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The DisableSystemRestore is set in Software\Policies\Microsoft\Windows\DeviceInstall\Settings
|
|
||||||
r = RegCreateKeyExA(path_key, p->szPath, 0, NULL, 0, KEY_SET_VALUE | KEY_QUERY_VALUE,
|
r = RegCreateKeyExA(path_key, p->szPath, 0, NULL, 0, KEY_SET_VALUE | KEY_QUERY_VALUE,
|
||||||
NULL, &policy_key, &disp);
|
NULL, &policy_key, &disp);
|
||||||
if (r != ERROR_SUCCESS) {
|
if (r != ERROR_SUCCESS) {
|
||||||
|
@ -829,7 +795,6 @@ error:
|
||||||
pLGPO->lpVtbl->Release(pLGPO);
|
pLGPO->lpVtbl->Release(pLGPO);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#pragma pop_macro("INTERFACE")
|
|
||||||
|
|
||||||
BOOL SetLGP(BOOL bRestore, BOOL* bExistingKey, const char* szPath, const char* szPolicy, DWORD dwValue)
|
BOOL SetLGP(BOOL bRestore, BOOL* bExistingKey, const char* szPath, const char* szPolicy, DWORD dwValue)
|
||||||
{
|
{
|
||||||
|
|
35
src/stdlg.c
35
src/stdlg.c
|
@ -1544,27 +1544,24 @@ BOOL SetUpdateCheck(void)
|
||||||
WriteSetting32(SETTING_UPDATE_INTERVAL, 86400);
|
WriteSetting32(SETTING_UPDATE_INTERVAL, 86400);
|
||||||
}
|
}
|
||||||
// Also detect if we can use Fido, which depends on:
|
// Also detect if we can use Fido, which depends on:
|
||||||
|
// - Powershell being installed
|
||||||
// - Update check being enabled
|
// - Update check being enabled
|
||||||
// - URL for the script being reachable
|
// - URL for the script being reachable
|
||||||
if (ReadSetting32(SETTING_UPDATE_INTERVAL) > 0) {
|
if (((ReadRegistryKey32(REGKEY_HKLM, "Microsoft\\PowerShell\\1\\Install") > 0) ||
|
||||||
char *p, url[128];
|
(ReadRegistryKey32(REGKEY_HKLM, "Microsoft\\PowerShell\\3\\Install") > 0)) &&
|
||||||
// Obviously, we could fetch https://api.github.com/repos/pbatard/Fido/releases/latest
|
(ReadSetting32(SETTING_UPDATE_INTERVAL) > 0)) {
|
||||||
// and then parse 'browser_download_url' in the JSON data to get the direct link we
|
char *loc = NULL;
|
||||||
// want. But that would force us to download an extra 5 KB of data, which we *really*
|
// Get the Fido URL from parsing a 'Fido.ver' on our server. This enables the use of different
|
||||||
// don't want to do when we need a superfast availability check.
|
// Fido versions from different versions of Rufus, if needed, as opposed to always downloading
|
||||||
// Therefore, since we don't expect GitHub to change their scheme anytime soon, we
|
// the latest release from GitHub, which may contain incompatible changes...
|
||||||
// just hack the redirected URL we got back to replace '/tag/' with '/download/'...
|
uint64_t loc_len = DownloadToFileOrBuffer(RUFUS_URL "/Fido.ver", NULL, (BYTE**)&loc, NULL, FALSE);
|
||||||
static_sprintf(url, "%s/%s", ResolveRedirect(FIDO_BASE), FIDO_NAME);
|
if ((loc_len != 0) && (loc_len < 4 * KB)) {
|
||||||
p = strstr(url, "/tag/");
|
loc_len++; // DownloadToFileOrBuffer allocated an extra NUL character if needed
|
||||||
if (p != NULL) {
|
fido_url = get_token_data_buffer(FIDO_VERSION, 1, loc, (size_t)loc_len);
|
||||||
*p = 0;
|
uprintf("Fido URL is %s", fido_url);
|
||||||
strcpy(fido_url, url);
|
enable_fido = IsDownloadable(fido_url);
|
||||||
strcat(fido_url, "/download/");
|
|
||||||
strcat(fido_url, &p[5]);
|
|
||||||
} else {
|
|
||||||
strcpy(fido_url, url);
|
|
||||||
}
|
}
|
||||||
enable_fido = IsDownloadable(fido_url);
|
safe_free(loc);
|
||||||
}
|
}
|
||||||
if (!enable_fido)
|
if (!enable_fido)
|
||||||
uprintf("Note: ISO download feature will be disabled");
|
uprintf("Note: ISO download feature will be disabled");
|
||||||
|
@ -2015,7 +2012,7 @@ BOOL SetAlertPromptHook(void)
|
||||||
}
|
}
|
||||||
FreeLibrary(mui_lib);
|
FreeLibrary(mui_lib);
|
||||||
}
|
}
|
||||||
static_strcpy(title_str[2], lmprintf(MSG_143));
|
static_strcpy(title_str[2], lmprintf(MSG_149));
|
||||||
|
|
||||||
ap_weh = SetWinEventHook(EVENT_SYSTEM_FOREGROUND, EVENT_SYSTEM_FOREGROUND, NULL,
|
ap_weh = SetWinEventHook(EVENT_SYSTEM_FOREGROUND, EVENT_SYSTEM_FOREGROUND, NULL,
|
||||||
AlertPromptHook, 0, 0, WINEVENT_OUTOFCONTEXT | WINEVENT_SKIPOWNPROCESS);
|
AlertPromptHook, 0, 0, WINEVENT_OUTOFCONTEXT | WINEVENT_SKIPOWNPROCESS);
|
||||||
|
|
Loading…
Reference in a new issue