James Hawkins wrote:
+static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) +{ ...
- service = CreateServiceW(hscm, name, disp, SERVICE_START |
GENERIC_ALL,
serv_type, start_type, err_control,
file->TargetPath,
load_order, NULL, depends, serv_name, pass);
- if (!service)
ERR("Failed to create service %s: %ld\n", debugstr_w(disp),
GetLastError());
- if (!StartServiceW(service, 0, NULL))
ERR("Failed to start service %s: %ld\n", debugstr_w(disp),
GetLastError());
Is this function really supposed to start the service as well? Shouldn't this be done by the StartServices action instead (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/s...
On 7/10/06, Robert Shearman rob@codeweavers.com wrote:
James Hawkins wrote:
+static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) +{ ...
- service = CreateServiceW(hscm, name, disp, SERVICE_START |
GENERIC_ALL,
serv_type, start_type, err_control,
file->TargetPath,
load_order, NULL, depends, serv_name, pass);
- if (!service)
ERR("Failed to create service %s: %ld\n", debugstr_w(disp),
GetLastError());
- if (!StartServiceW(service, 0, NULL))
ERR("Failed to start service %s: %ld\n", debugstr_w(disp),
GetLastError());
Is this function really supposed to start the service as well? Shouldn't this be done by the StartServices action instead (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/s...
When I first wrote InstallServices, I left out the StartService call, because that makes sense, but the installers were still failing to connect to the service, leaving the long delay. I checked and there's nothing in the StartServices table before or during runtime. Adding the call to StartService makes it work. Is there some functionality missing in advapi32 where a service starts up on demand if a process tries to connect to it? Reading through the relay and advapi logs, I couldn't find a call to StartService, so I get the feeling the installer expects the service to already be running, but I could be wrong.