- fix 2 bugs in unattend setup

- add option to start dbgprint.exe on 3rd boot when unattend key BootCDRegtestActive key is found (this makes sysreg detect that the 3rd boot has completed successfully)


svn path=/trunk/; revision=28657
This commit is contained in:
Johannes Anderwald 2007-08-29 21:10:05 +00:00
parent 592433992d
commit 7d883c8352

View file

@ -1999,6 +1999,8 @@ ProcessUnattendInf(HINF hUnattendedInf)
TCHAR szName[256]; TCHAR szName[256];
TCHAR szValue[MAX_PATH]; TCHAR szValue[MAX_PATH];
DWORD LineLength; DWORD LineLength;
HKEY hKey;
DWORD BootCDRegtestActive = 0;
if (!SetupFindFirstLine(hUnattendedInf, if (!SetupFindFirstLine(hUnattendedInf,
_T("Unattend"), _T("Unattend"),
@ -2089,27 +2091,25 @@ ProcessUnattendInf(HINF hUnattendedInf)
{ {
SetupData.TimeZoneIndex = _ttoi(szValue); SetupData.TimeZoneIndex = _ttoi(szValue);
} }
else if (_tcscmp(szName, _T("DisableAutoDaylightTimeSet"))) else if (!_tcscmp(szName, _T("DisableAutoDaylightTimeSet")))
{ {
SetupData.DisableAutoDaylightTimeSet = _ttoi(szValue); SetupData.DisableAutoDaylightTimeSet = _ttoi(szValue);
} }
else if (_tcscmp(szName, _T("DisableVmwInst"))) else if (!_tcscmp(szName, _T("DisableVmwInst")))
{ {
if(_tcscmp(szValue, _T("yes"))) SetupData.DisableVmwInst = 1; if(!_tcscmp(szValue, _T("yes")))
else SetupData.DisableVmwInst = 0; SetupData.DisableVmwInst = 1;
else
SetupData.DisableVmwInst = 0;
} }
else if (!_tcscmp(szName, _T("BootCDRegTestActive")))
{
BootCDRegtestActive = _ttoi(szValue);
}
} }
while (SetupFindNextLine(&InfContext, &InfContext)); while (SetupFindNextLine(&InfContext, &InfContext));
if (SetupFindFirstLine(hUnattendedInf,
_T("GuiRunOnce"),
NULL,
&InfContext))
{
HKEY hKey;
int i;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce"), _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce"),
0, 0,
@ -2120,8 +2120,26 @@ ProcessUnattendInf(HINF hUnattendedInf)
return TRUE; return TRUE;
} }
i = 0; if (BootCDRegtestActive)
{
_tcscpy(szValue, _T("C:\\ReactOS\\bin\\dbgprint.exe SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE"));
RegSetValueEx(hKey,
_T("BootCDRegtestActive"),
0,
REG_SZ,
(const BYTE*)szValue,
_tcslen(szValue) * sizeof(TCHAR));
}
if (SetupFindFirstLine(hUnattendedInf,
_T("GuiRunOnce"),
NULL,
&InfContext))
{
int i = 0;
do do
{ {
if(SetupGetStringField(&InfContext, if(SetupGetStringField(&InfContext,