mirror of
https://github.com/reactos/reactos.git
synced 2025-06-15 15:58:29 +00:00
Handle AddReg and DelReg in Service section
svn path=/trunk/; revision=31139
This commit is contained in:
parent
1eb3fdd821
commit
048409d7cb
1 changed files with 40 additions and 2 deletions
|
@ -1631,6 +1631,8 @@ static BOOL InstallOneService(
|
||||||
SC_HANDLE hService = NULL;
|
SC_HANDLE hService = NULL;
|
||||||
LPDWORD GroupOrder = NULL;
|
LPDWORD GroupOrder = NULL;
|
||||||
LPQUERY_SERVICE_CONFIGW ServiceConfig = NULL;
|
LPQUERY_SERVICE_CONFIGW ServiceConfig = NULL;
|
||||||
|
HKEY hServicesKey, hServiceKey;
|
||||||
|
LONG rc;
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
|
|
||||||
HKEY hGroupOrderListKey = NULL;
|
HKEY hGroupOrderListKey = NULL;
|
||||||
|
@ -1752,7 +1754,6 @@ static BOOL InstallOneService(
|
||||||
if (useTag)
|
if (useTag)
|
||||||
{
|
{
|
||||||
/* Add the tag to SYSTEM\CurrentControlSet\Control\GroupOrderList key */
|
/* Add the tag to SYSTEM\CurrentControlSet\Control\GroupOrderList key */
|
||||||
LONG rc;
|
|
||||||
LPCWSTR lpLoadOrderGroup;
|
LPCWSTR lpLoadOrderGroup;
|
||||||
DWORD bufferSize;
|
DWORD bufferSize;
|
||||||
|
|
||||||
|
@ -1831,7 +1832,44 @@ static BOOL InstallOneService(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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:
|
cleanup:
|
||||||
if (hSCManager != NULL)
|
if (hSCManager != NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue