mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 05:22:57 +00:00
[SYSSETUP] Fix timezone setup in the unattended install of ReactOS. Spotted and fixed by V. CORE-9648
svn path=/trunk/; revision=67516
This commit is contained in:
parent
a4675648df
commit
e242dc3f08
1 changed files with 29 additions and 20 deletions
|
@ -1219,27 +1219,36 @@ GetTimeZoneListIndex(LPDWORD lpIndex)
|
||||||
BOOL bFound = FALSE;
|
BOOL bFound = FALSE;
|
||||||
unsigned long iLanguageID;
|
unsigned long iLanguageID;
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
if (*lpIndex == -1)
|
||||||
L"SYSTEM\\CurrentControlSet\\Control\\NLS\\Language",
|
|
||||||
0,
|
|
||||||
KEY_ALL_ACCESS,
|
|
||||||
&hKey))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
dwValueSize = 9 * sizeof(WCHAR);
|
|
||||||
if (RegQueryValueExW(hKey,
|
|
||||||
L"Default",
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
(LPBYTE)szLanguageIdString,
|
|
||||||
&dwValueSize))
|
|
||||||
{
|
{
|
||||||
RegCloseKey(hKey);
|
*lpIndex = 85; /* fallback to GMT time zone */
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
iLanguageID = wcstoul(szLanguageIdString, NULL, 16);
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
||||||
RegCloseKey(hKey);
|
L"SYSTEM\\CurrentControlSet\\Control\\NLS\\Language",
|
||||||
|
0,
|
||||||
|
KEY_ALL_ACCESS,
|
||||||
|
&hKey))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
dwValueSize = 9 * sizeof(WCHAR);
|
||||||
|
if (RegQueryValueExW(hKey,
|
||||||
|
L"Default",
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
(LPBYTE)szLanguageIdString,
|
||||||
|
&dwValueSize))
|
||||||
|
{
|
||||||
|
RegCloseKey(hKey);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
iLanguageID = wcstoul(szLanguageIdString, NULL, 16);
|
||||||
|
RegCloseKey(hKey);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iLanguageID = *lpIndex;
|
||||||
|
}
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
||||||
L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones",
|
L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones",
|
||||||
|
@ -1515,7 +1524,7 @@ DateTimePageDlgProc(HWND hwndDlg,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowTimeZoneList(GetDlgItem(hwndDlg, IDC_TIMEZONELIST),
|
ShowTimeZoneList(GetDlgItem(hwndDlg, IDC_TIMEZONELIST),
|
||||||
SetupData, 85 /* GMT time zone */);
|
SetupData, -1);
|
||||||
|
|
||||||
SendDlgItemMessage(hwndDlg, IDC_AUTODAYLIGHT, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
|
SendDlgItemMessage(hwndDlg, IDC_AUTODAYLIGHT, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue