How to get path to dll being run by SvcHost.exe in a C# program

Dave Cotton 41 Reputation points

I'm writing a service monitor program, I want to be able to record the version of the service being run. For those services run under SvcHost I want to know the full path to the DLL that SvcHost is hosting. I want the version of the DLL not the version of SvcHost.

The results returned by the WMI search Win32_Service are inconclusive. And I'm not finding the correct entry in the registry (assuming it exists).

Would appreciate some help, Thanks,

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,370 questions
{count} votes

Accepted answer
  1. RLWA32 40,946 Reputation points

    The service information is in the registry.

    Registry Key - HKLM\SYSTEM\CurrentControlSet\Services\<svcname>\Parameters
    Value - ServiceDll

    For example, process explorer shows for the CoreMessaging Service in svchost.exe -


    Registry editor -


    0 comments No comments

0 additional answers

Sort by: Most helpful