masz na myśli nie proces, a serwis. serwis jest procesem, ale proces nie jest serwisem.
google, msdn: http://msdn.microsoft.com/en-us/library/ms810435.aspx:
''Example 2
The following example creates the service on the local computer as an auto-start service that runs in its own process. It has dependencies on the TDI group and on the NetBIOS service. Notice that you must add quotes around the list of space-separated dependencies.
sc create NewService binpath= c:\nt\system32\NewServ.exe type=own start=auto depend="+TDI Netbios"
''
http://msdn.microsoft.com/en-us/library/ms681987(VS.85).aspx:
BOOL WINAPI ChangeServiceConfig(
__in SC_HANDLE hService,
__in DWORD dwServiceType,
__in DWORD dwStartType,
__in DWORD dwErrorControl,
__in_opt LPCTSTR lpBinaryPathName,
__in_opt LPCTSTR lpLoadOrderGroup,
__out_opt LPDWORD lpdwTagId,
__in_opt LPCTSTR lpDependencies,
__in_opt LPCTSTR lpServiceStartName,
__in_opt LPCTSTR lpPassword,
__in_opt LPCTSTR lpDisplayName
);
zwróć uwagę na lpDependencies - "A pointer to a double null-terminated array of null-separated names of services or load ordering groups that the system must start before this service can be started. (Dependency on a group means that this service can run if at least one member of the group is running after an attempt to start all members of the group.) Specify NULL if you are not changing the existing dependencies. Specify an empty string if the service has no dependencies.
You must prefix group names with SC_GROUP_IDENTIFIER so that they can be distinguished from a service name, because services and service groups share the same name space."