Set setup type to 0 before the end of 2nd stage in syssetup instead of winlogon

svn path=/trunk/; revision=28194
This commit is contained in:
Hervé Poussineau 2007-08-06 14:41:05 +00:00
parent e753659117
commit c88c4b4ad1
2 changed files with 30 additions and 37 deletions

View file

@ -53,38 +53,6 @@ GetSetupType(VOID)
}
static BOOL
SetSetupType (DWORD dwSetupType)
{
DWORD dwError;
HKEY hKey;
dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
L"SYSTEM\\Setup", //TEXT("SYSTEM\\Setup"),
0,
KEY_SET_VALUE,
&hKey);
if (dwError != ERROR_SUCCESS)
{
return FALSE;
}
dwError = RegSetValueExW (hKey,
L"SetupType", //TEXT("SetupType"),
0,
REG_DWORD,
(LPBYTE)&dwSetupType,
sizeof(DWORD));
RegCloseKey (hKey);
if (dwError != ERROR_SUCCESS)
{
return FALSE;
}
return TRUE;
}
static DWORD WINAPI
RunSetupThreadProc (IN LPVOID lpParameter)
{
@ -173,11 +141,6 @@ RunSetupThreadProc (IN LPVOID lpParameter)
CloseHandle (ProcessInformation.hThread);
CloseHandle (ProcessInformation.hProcess);
if (dwExitCode == 0)
{
SetSetupType (0);
}
TRACE ("RunSetup() done.\n");
return TRUE;

View file

@ -623,6 +623,35 @@ CreateShortcuts(VOID)
return TRUE;
}
static BOOL
SetSetupType(DWORD dwSetupType)
{
DWORD dwError;
HKEY hKey;
dwError = RegOpenKeyExW(
HKEY_LOCAL_MACHINE,
L"SYSTEM\\Setup",
0,
KEY_SET_VALUE,
&hKey);
if (dwError != ERROR_SUCCESS)
return FALSE;
dwError = RegSetValueExW(
hKey,
L"SetupType",
0,
REG_DWORD,
(LPBYTE)&dwSetupType,
sizeof(DWORD));
RegCloseKey(hKey);
if (dwError != ERROR_SUCCESS)
return FALSE;
return TRUE;
}
DWORD WINAPI
InstallReactOS(HINSTANCE hInstance)
{
@ -721,6 +750,7 @@ InstallReactOS(HINSTANCE hInstance)
InstallWizard();
SetupCloseInfFile(hSysSetupInf);
SetSetupType(0);
LogItem(SYSSETUP_SEVERITY_INFORMATION, L"Installing ReactOS done");
TerminateSetupActionLog();