From 0b0d97cc9224606df2cd6f9afd353a15b145d30f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Sat, 5 Feb 2011 16:00:11 +0000 Subject: [PATCH] [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 svn path=/trunk/; revision=50609 --- reactos/dll/win32/syssetup/install.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/syssetup/install.c b/reactos/dll/win32/syssetup/install.c index adf909ada4c..feb2136abf8 100644 --- a/reactos/dll/win32/syssetup/install.c +++ b/reactos/dll/win32/syssetup/install.c @@ -477,15 +477,21 @@ EnableUserModePnpManager(VOID) 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 @@ EnableUserModePnpManager(VOID) 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;