There is a database in the Registry to control how services are loaded. This is the Service Control Manager database.
The Service Control Manager runs services.exe. Services are defined in the Registry under HKLM\SYSTEM\CurrentControlSet\Services. The Type
value of the service's entry specifies if it is loaded in its own process or in a process that hosts multiple services.
When the SCM decides to start a service, it calls ScStartService. ScStartService determines the name of the file that runs the service's process by reading the ImagePath
value from the service's Registry key. The ImagePath
value also contains the name of the group. It then examines the Type
value. A value of 0x20 indicates a shared process.
To answer your question about how to make a service run in its own process, use the sc config
command.
Example: sc config wuauserv type= own
The space after = is required.