diff --git a/reactos/base/system/winlogon/setup.c b/reactos/base/system/winlogon/setup.c index d9a2dc5cc2c..03a89a1bd42 100644 --- a/reactos/base/system/winlogon/setup.c +++ b/reactos/base/system/winlogon/setup.c @@ -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; diff --git a/reactos/dll/win32/syssetup/install.c b/reactos/dll/win32/syssetup/install.c index 25deb182d02..28231fb70cb 100644 --- a/reactos/dll/win32/syssetup/install.c +++ b/reactos/dll/win32/syssetup/install.c @@ -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();