Display hardware wizard only after user logged in.
authorHervé Poussineau <hpoussin@reactos.org>
Fri, 11 Jan 2008 13:00:44 +0000 (13:00 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Fri, 11 Jan 2008 13:00:44 +0000 (13:00 +0000)
It still needs improvement, to first try once to install without user intervention, and then, once an admin is logged on, ask it for still not installed devices.

svn path=/trunk/; revision=31714

reactos/base/services/umpnpmgr/umpnpmgr.c

index a306ad7..8d8c1df 100644 (file)
@@ -207,6 +207,9 @@ PNP_ReportLogOn(handle_t BindingHandle,
 
     DPRINT("PNP_ReportLogOn(%u, %u) called\n", Admin, ProcessId);
 
+    if (hInstallEvent != NULL)
+        SetEvent(hInstallEvent);
+
     /* Get the users token */
     hProcess = OpenProcess(PROCESS_ALL_ACCESS,
                            TRUE,
@@ -226,8 +229,8 @@ PNP_ReportLogOn(handle_t BindingHandle,
     }
 
     /* Trigger the installer thread */
-    if (hInstallEvent != NULL)
-        SetEvent(hInstallEvent);
+    /*if (hInstallEvent != NULL)
+        SetEvent(hInstallEvent);*/
 
     return CR_SUCCESS;
 }
@@ -1680,6 +1683,8 @@ DeviceInstallThread(LPVOID lpParameter)
 
     UNREFERENCED_PARAMETER(lpParameter);
 
+    WaitForSingleObject(hInstallEvent, INFINITE);
+
     showWizard = !SetupIsActive() && !IsConsoleBoot();
 
     while (TRUE)