- 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 szValue[MAX_PATH];
DWORD LineLength;
HKEY hKey;
DWORD BootCDRegtestActive = 0;
if (!SetupFindFirstLine(hUnattendedInf,
_T("Unattend"),
@ -2089,39 +2091,55 @@ ProcessUnattendInf(HINF hUnattendedInf)
{
SetupData.TimeZoneIndex = _ttoi(szValue);
}
else if (_tcscmp(szName, _T("DisableAutoDaylightTimeSet")))
else if (!_tcscmp(szName, _T("DisableAutoDaylightTimeSet")))
{
SetupData.DisableAutoDaylightTimeSet = _ttoi(szValue);
}
else if (_tcscmp(szName, _T("DisableVmwInst")))
else if (!_tcscmp(szName, _T("DisableVmwInst")))
{
if(_tcscmp(szValue, _T("yes"))) SetupData.DisableVmwInst = 1;
else SetupData.DisableVmwInst = 0;
if(!_tcscmp(szValue, _T("yes")))
SetupData.DisableVmwInst = 1;
else
SetupData.DisableVmwInst = 0;
}
else if (!_tcscmp(szName, _T("BootCDRegTestActive")))
{
BootCDRegtestActive = _ttoi(szValue);
}
}
while (SetupFindNextLine(&InfContext, &InfContext));
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce"),
0,
KEY_SET_VALUE,
&hKey) != ERROR_SUCCESS)
{
DPRINT1("Error: failed to open HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\n");
return TRUE;
}
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))
{
HKEY hKey;
int i;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce"),
0,
KEY_SET_VALUE,
&hKey) != ERROR_SUCCESS)
{
DPRINT1("Error: failed to open HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\n");
return TRUE;
}
i = 0;
int i = 0;
do
{
if(SetupGetStringField(&InfContext,