Set SystemSetupInProgress to 0 at the end of second stage setup

Remove dead code

svn path=/trunk/; revision=19224
This commit is contained in:
Hervé Poussineau 2005-11-14 15:35:41 +00:00
parent 92c165e46d
commit abfe5c5390
2 changed files with 14 additions and 51 deletions

View file

@ -236,57 +236,6 @@ 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)
{
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)

View file

@ -1375,6 +1375,16 @@ ProcessPageDlgProc(HWND hwndDlg,
}
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,
@ -1401,6 +1411,10 @@ FinishDlgProc(HWND hwndDlg,
}
break;
case WM_DESTROY:
SetupIsActive(0);
return TRUE;
case WM_TIMER:
{
INT Position;