locked
NAP Client UI (napstat.exe) behavior on Windows 7 RRS feed

  • Question

  • Hi,

    We have implemented a System Health Agent (SHA) which checks the status of services running on the client, registry entries etc.
    The SHA works fine on Windows XP SP3 and Windows Vista clients.

    However on Windows 7, the napstat.exe program is not loading our class which implements the INapComponentInfo interface. As a
    result messages from our SHA about the client health status are not being displayed to the user. Further our icon is also not shown
    in the Network Access Protection status dialog box. This class is in a separate DLL.

    Did any one else run into similar issues?

    Thanks,
    Pattabhi Attaluri.
    Tuesday, February 2, 2010 2:35 AM

Answers

  • Basically NAP won't load your class in-proc any more on Win7 for security reasons, so you need to author your class to run out-of-proc in dllhost.exe as below:

    1. Create an APPID with whatever guid you like in registry:

    [HKEY_CLASSES_ROOT\AppID\{71EB2D90-9A3F-4e5b-99A5-5A03E18F0F92}]
    @="ComponentInfo Class"
    "DllSurrogate"=""

    2. Point your classid to the appid above:

    [HKEY_CLASSES_ROOT\CLSID\{E19DDEC2-3FBE-4C3B-9317-679760C13AAE}]
    @="ComponentInfo Class"
    "AppID"="{71EB2D90-9A3F-4e5b-99A5-5A03E18F0F92}"

    NAP will launch your class within dllhost.exe. If you have Win7 NAP SDK, please refer to SHA\DLL\ComponentInfo.rgs.

    • Marked as answer by Tim Quan Friday, February 26, 2010 3:51 AM
    Wednesday, February 3, 2010 2:18 AM