set SystemSetupInProgress to 0 in syssetup instead of in setup (before rebooting the system)

svn path=/trunk/; revision=19108
This commit is contained in:
Christoph von Wittich 2005-11-09 23:17:13 +00:00
parent 5f45f14faf
commit dcd31dc02d
3 changed files with 15 additions and 1 deletions

View file

@ -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);
}

View file

@ -88,7 +88,6 @@ RunNewSetup (HINSTANCE hInstance)
SetupIsActive(1);
InstallReactOS = (PINSTALL_REACTOS)GetProcAddress (hDll, "InstallReactOS");
SetupIsActive(0);
if (InstallReactOS == NULL)
{

View file

@ -1,6 +1,8 @@
<module name="setup" type="win32gui" installbase="system32" installname="setup.exe">
<include base="setup">.</include>
<define name="__USE_W32API" />
<define name="UNICODE" />
<define name="_UNICODE" />
<define name="_WIN32_IE">0x0400</define>
<library>kernel32</library>
<library>userenv</library>