Set SystemSetupInProgress to 0 at the end of second stage setup Remove dead code Modified: trunk/reactos/lib/syssetup/install.c Modified: trunk/reactos/lib/syssetup/wizard.c _____
Modified: trunk/reactos/lib/syssetup/install.c --- trunk/reactos/lib/syssetup/install.c 2005-11-14 13:45:28 UTC (rev 19223) +++ trunk/reactos/lib/syssetup/install.c 2005-11-14 15:35:41 UTC (rev 19224) @@ -236,58 +236,7 @@
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) -{ - switch(msg) - { - case WM_INITDIALOG: - SendDlgItemMessage(hWnd, IDC_RESTART_PROGRESS, PBM_SETRANGE, 0, - MAKELPARAM(0, 300)); - SetTimer(hWnd, 1, 50, NULL); - return TRUE; - - case WM_TIMER: - { - INT Position; - HWND hWndProgress; - - 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); - } - return TRUE; - - case WM_COMMAND: - switch (wParam) - { - case IDOK: - case IDCANCEL: - EndDialog(hWnd, 0); - return TRUE; - } - break; - } - - return FALSE; -} - static VOID CreateTempDir(LPCWSTR VarName) { _____
Modified: trunk/reactos/lib/syssetup/wizard.c --- trunk/reactos/lib/syssetup/wizard.c 2005-11-14 13:45:28 UTC (rev 19223) +++ trunk/reactos/lib/syssetup/wizard.c 2005-11-14 15:35:41 UTC (rev 19224) @@ -1375,7 +1375,17 @@
}
+static 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 ); + } +}
+ static INT_PTR CALLBACK FinishDlgProc(HWND hwndDlg, UINT uMsg, @@ -1401,6 +1411,10 @@ } break;
+ case WM_DESTROY: + SetupIsActive(0); + return TRUE; + case WM_TIMER: { INT Position;