Author: hpoussin
Date: Tue Dec 11 13:26:45 2007
New Revision: 31139
URL:
http://svn.reactos.org/svn/reactos?rev=31139&view=rev
Log:
Handle AddReg and DelReg in Service section
Modified:
trunk/reactos/dll/win32/setupapi/install.c
Modified: trunk/reactos/dll/win32/setupapi/install.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/install…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/install.c (original)
+++ trunk/reactos/dll/win32/setupapi/install.c Tue Dec 11 13:26:45 2007
@@ -1631,6 +1631,8 @@
SC_HANDLE hService = NULL;
LPDWORD GroupOrder = NULL;
LPQUERY_SERVICE_CONFIGW ServiceConfig = NULL;
+ HKEY hServicesKey, hServiceKey;
+ LONG rc;
BOOL ret = FALSE;
HKEY hGroupOrderListKey = NULL;
@@ -1752,7 +1754,6 @@
if (useTag)
{
/* Add the tag to SYSTEM\CurrentControlSet\Control\GroupOrderList key */
- LONG rc;
LPCWSTR lpLoadOrderGroup;
DWORD bufferSize;
@@ -1831,7 +1832,44 @@
}
}
- ret = TRUE;
+ /* Handle AddReg and DelReg */
+ rc = RegOpenKeyExW(
+ list ? list->HKLM : HKEY_LOCAL_MACHINE,
+ REGSTR_PATH_SERVICES,
+ 0,
+ 0,
+ &hServicesKey);
+ if (rc != ERROR_SUCCESS)
+ {
+ SetLastError(rc);
+ goto cleanup;
+ }
+ rc = RegOpenKeyExW(
+ hServicesKey,
+ ServiceName,
+ 0,
+ KEY_READ | KEY_WRITE,
+ &hServiceKey);
+ RegCloseKey(hServicesKey);
+ if (rc != ERROR_SUCCESS)
+ {
+ SetLastError(rc);
+ goto cleanup;
+ }
+
+ ret = SetupInstallFromInfSectionW(
+ NULL,
+ hInf,
+ ServiceSection,
+ SPINST_REGISTRY,
+ hServiceKey,
+ NULL,
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
+ RegCloseKey(hServiceKey);
cleanup:
if (hSCManager != NULL)