From dcd31dc02dc8556ba509500f96e0fb24b63abd16 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Wed, 9 Nov 2005 23:17:13 +0000 Subject: [PATCH] set SystemSetupInProgress to 0 in syssetup instead of in setup (before rebooting the system) svn path=/trunk/; revision=19108 --- reactos/lib/syssetup/install.c | 13 +++++++++++++ reactos/subsys/system/setup/setup.c | 1 - reactos/subsys/system/setup/setup.xml | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/reactos/lib/syssetup/install.c b/reactos/lib/syssetup/install.c index d7b1ad19207..6290d4a452d 100644 --- a/reactos/lib/syssetup/install.c +++ b/reactos/lib/syssetup/install.c @@ -236,6 +236,16 @@ AppendRidToSid (PSID *Dst, Dst); } +VOID +SetupIsActive( DWORD dw ) +{ + HKEY hKey = 0; + if (RegOpenKeyEx( HKEY_LOCAL_MACHINE, _T("SYSTEM\\Setup"), 0, KEY_WRITE, &hKey ) == ERROR_SUCCESS) { + RegSetValueEx( hKey, _T("SystemSetupInProgress"), 0, REG_DWORD, (CONST BYTE *)&dw, sizeof(dw) ); + RegCloseKey( hKey ); + } +} + INT_PTR CALLBACK RestartDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { @@ -255,7 +265,10 @@ RestartDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) hWndProgress = GetDlgItem(hWnd, IDC_RESTART_PROGRESS); Position = SendMessage(hWndProgress, PBM_GETPOS, 0, 0); if (Position == 300) + { + SetupIsActive(0); EndDialog(hWnd, 0); + } else SendMessage(hWndProgress, PBM_SETPOS, Position + 1, 0); } diff --git a/reactos/subsys/system/setup/setup.c b/reactos/subsys/system/setup/setup.c index 2e4b4e568ba..50eb5676002 100644 --- a/reactos/subsys/system/setup/setup.c +++ b/reactos/subsys/system/setup/setup.c @@ -88,7 +88,6 @@ RunNewSetup (HINSTANCE hInstance) SetupIsActive(1); InstallReactOS = (PINSTALL_REACTOS)GetProcAddress (hDll, "InstallReactOS"); - SetupIsActive(0); if (InstallReactOS == NULL) { diff --git a/reactos/subsys/system/setup/setup.xml b/reactos/subsys/system/setup/setup.xml index eb9c3f3dd1c..fc77f84bb29 100644 --- a/reactos/subsys/system/setup/setup.xml +++ b/reactos/subsys/system/setup/setup.xml @@ -1,6 +1,8 @@ . + + 0x0400 kernel32 userenv