1

I had a WMI provider and because of design constraints, I would like to add it as a decoupled provider to a Windows Service (WS). I am following simple steps like:

  1. In Windows Service Solution in VS, I have added WMI Provider as a project.
  2. Set Hosting Model as HostingModel = ManagementHostingModel.Decoupled
  3. Change Setup project for WS such that output dll of the provider are copied to c:\Prog...\xyz folder during installation

I want the decoupled provider to work as before (All class instances are same as before - no behavior change). Both provider and WS are written in C#. I have not done registration of the provider in WS - do I need to do (If yes, how?)?

However, when I try to enumerate a class through PowerShell I get the following error: FullyQualifiedErrorId : HRESULT 0x80041016,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand

Also, when viewing through Process Explorer, I can see that provider dll is shown in the process for WS.

Why am I getting this error?

4

0 回答 0