set SystemSetupInProgress to 0 in syssetup instead of in setup (before rebooting...
authorChristoph von Wittich <christoph_vw@reactos.org>
Wed, 9 Nov 2005 23:17:13 +0000 (23:17 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Wed, 9 Nov 2005 23:17:13 +0000 (23:17 +0000)
svn path=/trunk/; revision=19108

reactos/lib/syssetup/install.c
reactos/subsys/system/setup/setup.c
reactos/subsys/system/setup/setup.xml

index d7b1ad1..6290d4a 100644 (file)
@@ -236,6 +236,16 @@ AppendRidToSid (PSID *Dst,
                               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)
 {
 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)
             hWndProgress = GetDlgItem(hWnd, IDC_RESTART_PROGRESS);
             Position = SendMessage(hWndProgress, PBM_GETPOS, 0, 0);
             if (Position == 300)
+            {
+               SetupIsActive(0);
                EndDialog(hWnd, 0);
                EndDialog(hWnd, 0);
+            }
             else
                SendMessage(hWndProgress, PBM_SETPOS, Position + 1, 0);
          }
             else
                SendMessage(hWndProgress, PBM_SETPOS, Position + 1, 0);
          }
index 2e4b4e5..50eb567 100644 (file)
@@ -88,7 +88,6 @@ RunNewSetup (HINSTANCE hInstance)
 
   SetupIsActive(1);
   InstallReactOS = (PINSTALL_REACTOS)GetProcAddress (hDll, "InstallReactOS");
 
   SetupIsActive(1);
   InstallReactOS = (PINSTALL_REACTOS)GetProcAddress (hDll, "InstallReactOS");
-  SetupIsActive(0);
 
   if (InstallReactOS == NULL)
     {
 
   if (InstallReactOS == NULL)
     {
index eb9c3f3..fc77f84 100644 (file)
@@ -1,6 +1,8 @@
 <module name="setup" type="win32gui" installbase="system32" installname="setup.exe">
        <include base="setup">.</include>
        <define name="__USE_W32API" />
 <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>
        <define name="_WIN32_IE">0x0400</define>
        <library>kernel32</library>
        <library>userenv</library>