Skip to content

Commit

Permalink
[wue] add TimeZone to regional options replication
Browse files Browse the repository at this point in the history
* Closes #2499.
  • Loading branch information
pbatard committed Jul 8, 2024
1 parent 83b1e73 commit 10d33c6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/rufus.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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 4.6.2186"
CAPTION "Rufus 4.6.2187"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
Expand Down Expand Up @@ -397,8 +397,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,6,2186,0
PRODUCTVERSION 4,6,2186,0
FILEVERSION 4,6,2187,0
PRODUCTVERSION 4,6,2187,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -416,13 +416,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "4.6.2186"
VALUE "FileVersion", "4.6.2187"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "� 2011-2024 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-4.6.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "4.6.2186"
VALUE "ProductVersion", "4.6.2187"
END
END
BLOCK "VarFileInfo"
Expand Down
6 changes: 6 additions & 0 deletions src/wue.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "resource.h"
#include "registry.h"
#include "msapi_utf8.h"
#include "timezoneapi.h"
#include "localization.h"

/* Memory leaks detection - define _CRTDBG_MAP_ALLOC as preprocessor macro */
Expand Down Expand Up @@ -64,6 +65,7 @@ char* CreateUnattendXml(int arch, int flags)
const static char* unallowed_account_names[] = { "Administrator", "Guest", "KRBTGT", "Local" };
static char path[MAX_PATH];
FILE* fd;
TIME_ZONE_INFORMATION tz_info;
int i, order;
unattend_xml_flags = flags;
if (arch < ARCH_X86_32 || arch > ARCH_ARM_64 || flags == 0) {
Expand Down Expand Up @@ -199,6 +201,10 @@ char* CreateUnattendXml(int arch, int flags)
ReadRegistryKeyStr(REGKEY_HKCU, "Keyboard Layout\\Preload\\1"));
fprintf(fd, " <SystemLocale>%s</SystemLocale>\n", ToLocaleName(GetSystemDefaultLCID()));
fprintf(fd, " <UserLocale>%s</UserLocale>\n", ToLocaleName(GetUserDefaultLCID()));
if (GetTimeZoneInformation(&tz_info) == TIME_ZONE_ID_INVALID)
uprintf("WARNING: Could not retrieve current timezone: %s", WindowsErrorString());
else
fprintf(fd, " <TimeZone>%S</TimeZone>\n", tz_info.StandardName);
fprintf(fd, " <UILanguage>%s</UILanguage>\n", ToLocaleName(GetUserDefaultUILanguage()));
fprintf(fd, " <UILanguageFallback>%s</UILanguageFallback>\n",
// NB: Officially, this is a REG_MULTI_SZ string
Expand Down

0 comments on commit 10d33c6

Please sign in to comment.