[wue] enable applicable WUE options for Windows 10

* Also ensure that we print a message on the status bar while applying options.
This commit is contained in:
Pete Batard 2022-07-27 11:49:26 +01:00
parent 8790c480dd
commit 2c26f838f4
No known key found for this signature in database
GPG Key ID: 38E0CF5E69EDD671
6 changed files with 42 additions and 32 deletions

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: 2022-07-22 11:06+0100\n"
"PO-Revision-Date: 2022-07-22 11:14+0100\n"
"POT-Creation-Date: 2022-07-27 11:43+0100\n"
"PO-Revision-Date: 2022-07-27 11:44+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr_FR\n"
@ -1797,14 +1797,18 @@ msgid "Applying Windows customization: %s"
msgstr "Application des options de personnalisation de Windows: %s"
#. • MSG_326
msgid "Applying user options..."
msgstr "Application des options utilisateur..."
#. • MSG_327
msgid "Windows User Experience"
msgstr "Expérience de l'utilisateur Windows"
#. • MSG_327
#. • MSG_328
msgid "Customize Windows installation?"
msgstr "Personnaliser l'installation de Windows ?"
#. • MSG_328
#. • MSG_329
msgid "Remove requirement for 4GB+ RAM, Secure Boot and TPM 2.0"
msgstr "Supprimer la nécessité d'avoir 4Go+ de RAM, Secure Boot et TPM 2.0"
@ -1825,5 +1829,5 @@ msgid "Set a local account using the same name as this user's"
msgstr "Définir un compte local utilisant le même nom que celui de cet utilisateur"
#. • MSG_334
msgid "Set regional options to the same values as this user's"
msgid "Set regional options using the same values as this user's"
msgstr "Définir les options régionales avec les mêmes valeurs que celles de cet utilisateur"

View File

@ -583,14 +583,15 @@ t MSG_321 "The image you have selected is an ISOHybrid, but its creators have no
"copy mode.\nAs a result, DD image writing mode will be enforced."
t MSG_322 "Unable to open or read '%s'"
t MSG_325 "Applying Windows customization: %s"
t MSG_326 "Windows User Experience"
t MSG_327 "Customize Windows installation?"
t MSG_328 "Remove requirement for 4GB+ RAM, Secure Boot and TPM 2.0"
t MSG_326 "Applying user options..."
t MSG_327 "Windows User Experience"
t MSG_328 "Customize Windows installation?"
t MSG_329 "Remove requirement for 4GB+ RAM, Secure Boot and TPM 2.0"
t MSG_330 "Remove requirement for an online Microsoft account"
t MSG_331 "Disable data collection (Skip privacy questions)"
t MSG_332 "Prevent Windows To Go from accessing internal disks"
t MSG_333 "Set a local account using the same name as this user's"
t MSG_334 "Set regional options to the same values as this user's"
t MSG_334 "Set regional options using the same values as this user's"
#########################################################################
l "ar-SA" "Arabic (العربية)" 0x0401, 0x0801, 0x0c01, 0x1001, 0x1401, 0x1801, 0x1c01, 0x2001, 0x2401, 0x2801, 0x2c01, 0x3001, 0x3401, 0x3801, 0x3c01, 0x4001
@ -4305,9 +4306,10 @@ t MSG_320 "Rafraichissement du schéma de partition (%s)..."
t MSG_321 "Limage que vous avez sélectionnée est de type ISOHybrid, mais ses créateurs ne lont pas rendue compatible avec le mode ISO (i.e. copie de fichier).\nA cause de cela, seule lécriture en mode DD est applicable."
t MSG_322 "Impossible d'ouvrir ou de lire '%s'"
t MSG_325 "Application des options de personnalisation de Windows: %s"
t MSG_326 "Expérience de l'utilisateur Windows"
t MSG_327 "Personnaliser l'installation de Windows ?"
t MSG_328 "Supprimer la nécessité d'avoir 4Go+ de RAM, Secure Boot et TPM 2.0"
t MSG_326 "Application des options utilisateur..."
t MSG_327 "Expérience de l'utilisateur Windows"
t MSG_328 "Personnaliser l'installation de Windows ?"
t MSG_329 "Supprimer la nécessité d'avoir 4Go+ de RAM, Secure Boot et TPM 2.0"
t MSG_330 "Supprimer la nécessité d'utiliser un compte Microsoft en ligne"
t MSG_331 "Désactiver la collecte de données (Supprime les questions de confidentialité)"
t MSG_332 "Empêcher Windows To Go d'accéder aux disques internes"

View File

@ -1505,7 +1505,7 @@ static DWORD WINAPI BootCheckThread(LPVOID param)
default:
break;
}
if ((nWindowsVersion >= WINDOWS_8) && IS_WINDOWS_11(img_report)) {
if ((nWindowsVersion >= WINDOWS_8) && IS_WINDOWS_1X(img_report)) {
StrArray options;
int arch = _log2(img_report.has_efi >> 1);
uint8_t map[8] = { 0 }, b = 1;
@ -1522,7 +1522,7 @@ static DWORD WINAPI BootCheckThread(LPVOID param)
MAP_BIT(UNATTEND_DUPLICATE_USER);
StrArrayAdd(&options, lmprintf(MSG_334), TRUE);
MAP_BIT(UNATTEND_DUPLICATE_LOCALE);
i = SelectionDialog(BS_AUTOCHECKBOX, lmprintf(MSG_326), lmprintf(MSG_327),
i = SelectionDialog(BS_AUTOCHECKBOX, lmprintf(MSG_327), lmprintf(MSG_328),
options.String, options.Index, remap8(unattend_xml_mask, map, FALSE));
StrArrayDestroy(&options);
if (i < 0)
@ -1566,13 +1566,15 @@ static DWORD WINAPI BootCheckThread(LPVOID param)
MessageBoxExU(hMainDialog, lmprintf(MSG_100), lmprintf(MSG_099), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid);
goto out;
}
if ((nWindowsVersion >= WINDOWS_8) && IS_WINDOWS_11(img_report) && (!is_windows_to_go)) {
if ((nWindowsVersion >= WINDOWS_8) && IS_WINDOWS_1X(img_report) && (!is_windows_to_go)) {
StrArray options;
int arch = _log2(img_report.has_efi >> 1);
uint8_t map[8] = { 0 }, b = 1;
StrArrayCreate(&options, 4);
StrArrayAdd(&options, lmprintf(MSG_328), TRUE);
MAP_BIT(UNATTEND_SECUREBOOT_TPM_MINRAM);
if (IS_WINDOWS_11(img_report)) {
StrArrayAdd(&options, lmprintf(MSG_329), TRUE);
MAP_BIT(UNATTEND_SECUREBOOT_TPM_MINRAM);
}
if (img_report.win_version.build >= 22500) {
StrArrayAdd(&options, lmprintf(MSG_330), TRUE);
MAP_BIT(UNATTEND_NO_ONLINE_ACCOUNT);
@ -1583,7 +1585,7 @@ static DWORD WINAPI BootCheckThread(LPVOID param)
MAP_BIT(UNATTEND_DUPLICATE_USER);
StrArrayAdd(&options, lmprintf(MSG_334), TRUE);
MAP_BIT(UNATTEND_DUPLICATE_LOCALE);
i = SelectionDialog(BS_AUTOCHECKBOX, lmprintf(MSG_326), lmprintf(MSG_327),
i = SelectionDialog(BS_AUTOCHECKBOX, lmprintf(MSG_327), lmprintf(MSG_328),
options.String, options.Index, remap8(unattend_xml_mask, map, FALSE));
StrArrayDestroy(&options);
if (i < 0)

View File

@ -333,6 +333,7 @@ enum checksum_type {
#define HAS_WINPE(r) (((r.winpe & WINPE_I386) == WINPE_I386)||((r.winpe & WINPE_AMD64) == WINPE_AMD64)||((r.winpe & WINPE_MININT) == WINPE_MININT))
#define HAS_WINDOWS(r) (HAS_BOOTMGR(r) || (r.uses_minint) || HAS_WINPE(r))
#define HAS_WIN7_EFI(r) ((r.has_efi == 1) && HAS_WININST(r))
#define IS_WINDOWS_1X(r) (r.has_bootmgr_efi && (r.win_version.major >= 10))
#define IS_WINDOWS_11(r) (r.has_bootmgr_efi && (r.win_version.major >= 11))
#define HAS_EFI_IMG(r) (r.efi_img_path[0] != 0)
#define IS_DD_BOOTABLE(r) (r.is_bootable_img > 0)

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.20.1924"
CAPTION "Rufus 3.20.1925"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -395,8 +395,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,20,1924,0
PRODUCTVERSION 3,20,1924,0
FILEVERSION 3,20,1925,0
PRODUCTVERSION 3,20,1925,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -414,13 +414,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.20.1924"
VALUE "FileVersion", "3.20.1925"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2022 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-3.20.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.20.1924"
VALUE "ProductVersion", "3.20.1925"
END
END
BLOCK "VarFileInfo"

View File

@ -46,13 +46,13 @@ char* unattend_xml_path = NULL;
extern uint32_t wim_nb_files, wim_proc_files, wim_extra_files;
/// <summary>
/// Create an installation answer file containing the sections specified by the flags.
/// </summary>
/// <param name="arch">The processor architecture of the Windows image being used.</param>
/// <param name="flags">A bitmask representing the sections to enable.
/// See "Windows User Experience flags and masks" from rufus.h</param>
/// <returns>The path of a newly created answer file on success or NULL on error.</returns>
/// <summary>
/// Create an installation answer file containing the sections specified by the flags.
/// </summary>
/// <param name="arch">The processor architecture of the Windows image being used.</param>
/// <param name="flags">A bitmask representing the sections to enable.
/// See "Windows User Experience flags and masks" from rufus.h</param>
/// <returns>The path of a newly created answer file on success or NULL on error.</returns>
char* CreateUnattendXml(int arch, int flags)
{
static char path[MAX_PATH];
@ -499,7 +499,7 @@ out:
/// <returns>TRUE on success, FALSE on error.</returns>
BOOL SetupWinToGo(DWORD DriveIndex, const char* drive_name, BOOL use_esp)
{
char* mounted_iso, * ms_efi = NULL, mounted_image_path[128], cmd[MAX_PATH];
char *mounted_iso, *ms_efi = NULL, mounted_image_path[128], cmd[MAX_PATH];
ULONG cluster_size;
uprintf("Windows To Go mode selected");
@ -625,13 +625,14 @@ BOOL ApplyWindowsCustomization(char drive_letter, int flags)
char boot_wim_path[] = "?:\\sources\\boot.wim", key_path[64];
char appraiserres_dll_src[] = "?:\\sources\\appraiserres.dll";
char appraiserres_dll_dst[] = "?:\\sources\\appraiserres.bak";
char* mount_path = NULL, path[MAX_PATH];
char *mount_path = NULL, path[MAX_PATH];
HKEY hKey = NULL, hSubKey = NULL;
LSTATUS status;
DWORD dwDisp, dwVal = 1;
assert(unattend_xml_path != NULL);
uprintf("Applying Windows customization:");
PrintStatus(0, MSG_326);
if (flags & UNATTEND_WINDOWS_TO_GO) {
static_sprintf(path, "%c:\\Windows\\Panther", drive_letter);
if (!CreateDirectoryA(path, NULL) && GetLastError() != ERROR_ALREADY_EXISTS) {