mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[SYSSETUP] Unattended ComputerName=* means random name (#9267)
Windows supports[^1] using * as "automatic" for some entries. Let's support it as well. [^1]: https://web.archive.org/web/20070506023846/http://www.microsoft.com/technet/prodtechnol/Windows2000Pro/deploy/unattend/sp1ch01.mspx
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
* Ismael Ferreras Morezuelas <[email protected]>
|
||||
* Katayama Hirofumi MZ <[email protected]>
|
||||
* Oleg Dubinskiy <[email protected]>
|
||||
* Whindmar Saksit <[email protected]>
|
||||
*/
|
||||
|
||||
/* INCLUDES *****************************************************************/
|
||||
@@ -1160,9 +1161,13 @@ ComputerPageDlgProc(HWND hwndDlg,
|
||||
SetFocus(GetDlgItem(hwndDlg, IDC_COMPUTERNAME));
|
||||
if (pSetupData->UnattendSetup)
|
||||
{
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_COMPUTERNAME), WM_SETTEXT, 0, (LPARAM)pSetupData->ComputerName);
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_ADMINPASSWORD1), WM_SETTEXT, 0, (LPARAM)pSetupData->AdminPassword);
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_ADMINPASSWORD2), WM_SETTEXT, 0, (LPARAM)pSetupData->AdminPassword);
|
||||
/* "*" means use random name (we have already generated it above) */
|
||||
if (pSetupData->ComputerName[0] == L'*' && !pSetupData->ComputerName[1])
|
||||
wcscpy(pSetupData->ComputerName, ComputerName);
|
||||
else
|
||||
SetDlgItemTextW(hwndDlg, IDC_COMPUTERNAME, pSetupData->ComputerName);
|
||||
SetDlgItemTextW(hwndDlg, IDC_ADMINPASSWORD1, pSetupData->AdminPassword);
|
||||
SetDlgItemTextW(hwndDlg, IDC_ADMINPASSWORD2, pSetupData->AdminPassword);
|
||||
WriteComputerSettings(pSetupData->ComputerName, NULL);
|
||||
SetAdministratorPassword(pSetupData->AdminPassword);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user