Author: jgardou
Date: Sat Feb  5 16:00:11 2011
New Revision: 50609

URL: http://svn.reactos.org/svn/reactos?rev=50609&view=rev
Log:
[SYSSETUP]
SC Manager needs SC_MANAGER_ENUMERATE_SERVICE access right to be able to open a 
service
Add debug prints to help tracking down the "EnableUserModePnpManager()" issue

Modified:
    trunk/reactos/dll/win32/syssetup/install.c

Modified: trunk/reactos/dll/win32/syssetup/install.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/install.c?rev=50609&r1=50608&r2=50609&view=diff
==============================================================================
--- trunk/reactos/dll/win32/syssetup/install.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/syssetup/install.c [iso-8859-1] Sat Feb  5 16:00:11 
2011
@@ -477,15 +477,21 @@
     SC_HANDLE hService = NULL;
     BOOL ret = FALSE;
 
-    hSCManager = OpenSCManager(NULL, NULL, 0);
+    hSCManager = OpenSCManagerW(NULL, NULL, SC_MANAGER_ENUMERATE_SERVICE);
     if (hSCManager == NULL)
+    {
+        DPRINT1("Unable to open the service control manager.\n");
         goto cleanup;
+    }
 
     hService = OpenServiceW(hSCManager,
                             L"PlugPlay",
                             SERVICE_CHANGE_CONFIG | SERVICE_START);
     if (hService == NULL)
+    {
+        DPRINT1("Unable to open PlugPlay service\n");
         goto cleanup;
+    }
 
     ret = ChangeServiceConfigW(hService,
                                SERVICE_NO_CHANGE,
@@ -494,11 +500,17 @@
                                NULL, NULL, NULL,
                                NULL, NULL, NULL, NULL);
     if (!ret)
+    {
+        DPRINT1("Unable to change the service configuration\n");
         goto cleanup;
+    }
 
     ret = StartServiceW(hService, 0, NULL);
     if (!ret)
+    {
+        DPRINT("Unable to start service\n");
         goto cleanup;
+    }
 
     ret = TRUE;
 


Reply via email to