8

Is there a chart or a list of Windows 7 Profesional built-in services and their dependencies? I manually did this in the past with Windows XP when I had time, but there seems to be a couple dozen more services in Windows 7 and time is not on my side. A quick google search did not yeild anything.

I am trying to figure out why the my event log is showing so many services are start and stopping related to this question.

EDIT: Any Updates?

3 Answers3

2

A good start would be the services groups. Windows services are willing within groups to load according to them dependencies:

A Service Group is a collection of similar services that are loaded together at startup. Most services that appear in the HKEY_LOCAL_MACHINE\CurrentControlSet\Services subkey are part of a Service Group. Windows NT loads one Service Group at a time. Services that are not in a group are loaded after all Service Groups are loaded.

The HKEY_LOCAL_MACHINE\CurrentControlSet\Control\ServiceGroupOrder subkey determines the order in which Service Groups are loaded. The List value is a REG_MULT_SZ entry that specifies the Service Group order.

The HKEY_LOCAL_MACHINE\CurrentControlSet\Control\GroupOrderList subkey determines the order in which services within a Service Group are loaded. Services in a Service Group are assigned a tag, a unique numeric value within a Service Group which determines the service load order. Each value entry in GroupOrderList represents a Service Group. The value of the entry is a series of tags in a specified order. The first entry in this REG_BINARY value is the number of services in the group, followed by the tags in load sequence. If you look at PointerPort you can see that there are 3 services in the group and that the service with tag 02 is loaded first, followed by the service with tag 01 and then tag 03.

At a service level, the HKEY_LOCAL_MACHINE\CurrentControlSet\Services\ServiceName subkeys contain:

Group - this REG_SZ specifies the Service Group name that a service belongs to.

tag - this REG_DWORD specifies the service load sequence.

DependOnGroup - this REG_MULTI_SZ entry defines the Service Groups which must be loaded succesfully before this service loads.

DependOnService - this REG_MULTI_SZ entry defines services that must be loaded successfully before this service loads.

Diogo
  • 30,792
1

Once upon a time I'd found a tool that did exactly what you're asking for (back when Windows XP was new), but I don't have a copy anymore and I can't find it. It didn't handle service groups though, so it would be of limited utility.

The closest thing I can find now is the Windows Service Dependency Viewer. It's not ideal though.

afrazier
  • 23,505
0

There are PowerShell functions that can enumerate depending and required services. Stumbled over this when I was searching for a solution to the same problem: .DependentServices and .ServicesDependedOn

Here's a full script (adapted from the original/source):

# https://dkalemis.wordpress.com/2015/03/02/visualize-the-services-graph-of-your-windows-os/
#   replace "DisplayName" with "Name" ore vice versa.

function List-DependentServices ($inputService, $inputPadding) { if ($inputService.DependentServices) { $padding = " " + $inputPadding $output = $padding + "/\ is required by these services:" $output $padding = " " + $padding

    foreach ($ds in $inputService.DependentServices)
    {
        $output = $padding + $ds.Name
        $output
        List-DependentServices $ds $padding
    }
}

}

function List-ServicesDependedOn ($inputService, $inputPadding) { if ($inputService.ServicesDependedOn) { $padding = " " + $inputPadding $output = $padding + "/ depends on these services:" $output $padding = " " + $padding

    foreach ($rs in $inputService.ServicesDependedOn)
    {  
        $output = $padding + $rs.Name
        $output
        List-ServicesDependedOn $rs $padding
    }
} 

}

$services = Get-Service foreach ($service in $services) { $output = $service.Name $output List-DependentServices $service "" List-ServicesDependedOn $service "" }

And this can help to execute it (redirect output > toText.file)

powershell.exe "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '.\ServiceGraphRecursively.ps1'"

The original author went a step further and explains how to parse the text output from this script into an actual graph.

Limer
  • 471