This project has moved. For the latest updates, please go here.

How to register the dll

Sep 4, 2016 at 11:12 AM
So I am trying to compile the code with Visual studio 2013, but I am having trouble to install it with installUtil.exe. it will always fail. however, if I remove the override methods in MyInstall, it can be installed successfully, but the next problem is, it can't return instances to wmi. the error is error loading WMI provider. any idea how to trouble shoot this?
I am new to WMI provider, still trying to grab the concepts now. it would be great if people can recommend some material for me.
Sep 5, 2016 at 12:09 PM
Have you tried to add the DLL to the Global Assembly Cache (GAC) before you run InstallUtil ?
"%~dp0GacUtil.exe" /i "%~dp0LocalAdminWMIProvider.dll" /f /silent
%SYSTEMROOT%\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe /i "%~dp0LocalAdminWMIProvider.dll"
Are you using the x64 Version of InstallUtil on x64 Machines ?
Sep 6, 2016 at 4:51 AM
Thank you Mr. Zander, I add gacutil.exe /if LocalAdminWMIProvider.dll, it fixed the problem.