[wix-users] Register WMI Provided (mofcomp)

Herman van Drie hvandrie at outlook.com
Mon Aug 7 20:55:37 PDT 2017


If you already made a Windows Service and the service runs in the Local System security context, why don't you include a function in the service to:
1. verify the WMI namespace
2. do the provider dll registration
3. use IMofCompiler:CompileFile method to compile the mof when required
(https://msdn.microsoft.com/en-us/library/aa390867(v=vs.85).aspx)

Than, there's no need to include this into your installer project. Saves a hazzle.

Cheers,

Herman

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Christopher Painter
Sent: dinsdag 8 augustus 2017 01:50
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Register WMI Provided (mofcomp)

FWIW, having the service perform the self registration isn't a windows installer best practice.  It can fail in certain ways and should be avoided.


For calling the mof comp bat you want to research the WiX Quiet Execute custom action.  You'll want to run it in deferred execution with no impersonation (system context).  Basically you'll have a Type 51 set property  that will pass custom action data to the CA.  If you are calling a .BAT file you'll be something like .....


"[SystemFolder]cmd.exe" /c "[#fileKeyToBATFile]"


Note ^^ has to be wrapped in quotes and fully qualified path to the CMD.EXE.


In general I avoid calling .BAT files but I'm not honestly versed in wmi enough to provide any better suggestions at the moment.  I'd have to research it.


________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Silverman, Ariel <ariel.silverman at intel.com>
Sent: Monday, August 7, 2017 2:37 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Register WMI Provided (mofcomp)

Hi Christopher,

Thanks for your answer and help!

I have implemented dll registration as a commandline parameter on my windows service, it serves as the WMI provider for my WMI namespace. I am currently having some difficulties understanding how to perform the mofcomp command as part of my installation. The current InstallShield solution we use is installing the MOF files into SUPPORTDIR and executing a mofcomp batch. The question I am facing is how to translate that op into Wix Toolset

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Christopher Painter
Sent: Monday, August 7, 2017 12:32 PM
To: wix-users at lists.wixtoolset.org
Subject: Re: [wix-users] Register WMI Provided (mofcomp)

I wrote a custom WMI provider about 5 years ago. If memory serves you have to install the DLL and MOF,  register the DLL (regsvr32 is bad.. use Heat to extract the COM meta data from the DLL )  and compile the MOF.


If you know how to do this all by hand I could help translate to WiX.


________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Silverman, Ariel <ariel.silverman at intel.com>
Sent: Monday, August 7, 2017 2:17 PM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Register WMI Provided (mofcomp)

Hi wix-users,

The installer for my current project requires a WMI provider registration step, I've browsed through the internet hoping someone had already solved this using Wix Toolse, but unfortunately found nothing.
Is anyone familiar with resources that can help me accomplish this task?.
This operation is currently performed by our InstallShield project by copying the mofs to SUPPORTDIR and then running a mofcomp batchfile.

Any help on this regard will be most appreciated!

-Ariel


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

WiX Support | WiX Experts and Resources from FireGiant<http://www.firegiant.com/>
www.firegiant.com<http://www.firegiant.com>
WiX Support | Installation, Development, Deployment | WiX Experts and Resources from FireGiant




____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list