Index: reactos/boot/bootdata/bootcd/unattend.inf =================================================================== --- reactos/boot/bootdata/bootcd/unattend.inf (revision 74629) +++ reactos/boot/bootdata/bootcd/unattend.inf (working copy) @@ -5,7 +5,7 @@ ; yes - unattend setup enabled ; no - unattend setup disabled -UnattendSetupEnabled = no +UnattendSetupEnabled = yes ; Install to \Device\Harddisk0\Partition1\ReactOS DestinationDiskNumber = 0 @@ -42,7 +42,7 @@ ; enable this setting to disable Gecko install ; yes - disabled ; no - enabled -DisableGeckoInst = no +DisableGeckoInst = yes ; set this option to automatically ; specify language in 2nd mode setup @@ -56,3 +56,8 @@ ; [GuiRunOnce] ; %SystemRoot%\system32\cmd.exe +[Display] +BitsPerPel = 32 +XResolution = 1440 +YResolution = 900 +VRefresh = 0 Index: reactos/dll/win32/syssetup/wizard.c =================================================================== --- reactos/dll/win32/syssetup/wizard.c (revision 74629) +++ reactos/dll/win32/syssetup/wizard.c (working copy) @@ -2211,6 +2211,75 @@ } while (SetupFindNextLine(&InfContext, &InfContext)); + + if (SetupFindFirstLineW(pSetupData->hUnattendedInf, + L"Display", + NULL, + &InfContext)) + { + DEVMODEA dm = { { 0 } }; + dm.dmSize = sizeof(dm); + if (EnumDisplaySettingsA(NULL, ENUM_CURRENT_SETTINGS, &dm)) + { + do + { + int iValue; + if (!SetupGetStringFieldW(&InfContext, + 0, + szName, + sizeof(szName) / sizeof(WCHAR), + &LineLength)) + { + DPRINT1("Error: SetupGetStringField failed with %d\n", GetLastError()); + return; + } + + if (!SetupGetStringFieldW(&InfContext, + 1, + szValue, + sizeof(szValue) / sizeof(WCHAR), + &LineLength)) + { + DPRINT1("Error: SetupGetStringField failed with %d\n", GetLastError()); + return; + } + iValue = _wtoi(szValue); + DPRINT1("Name %S Value %i\n", szName, iValue); + + if (!iValue) + continue; + + if (!wcscmp(szName, L"BitsPerPel")) + { + dm.dmFields |= DM_BITSPERPEL; + dm.dmBitsPerPel = iValue; + } + else if (!wcscmp(szName, L"XResolution")) + { + dm.dmFields |= DM_PELSWIDTH; + dm.dmPelsWidth = iValue; + } + else if (!wcscmp(szName, L"YResolution")) + { + dm.dmFields |= DM_PELSHEIGHT; + dm.dmPelsHeight = iValue; + } + else if (!wcscmp(szName, L"VRefresh")) + { + dm.dmFields |= DM_DISPLAYFREQUENCY; + dm.dmDisplayFrequency = iValue; + } + } + while (SetupFindNextLine(&InfContext, &InfContext)); + + ChangeDisplaySettingsA(&dm, CDS_UPDATEREGISTRY); + } + } + + + + + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce", 0,