Co-installer for Processing DDInstall.WMI

[This is preliminary documentation and subject to change.]

Abstract: This document accompanies the redistributable co-installer that can be used inside an INF file to process the [DDInstall.WMI] on Windows 2000 and Windows XP. The functionality is already included in Windows Server 2003 and later.

SUMMARY

It is crucial to set WMI security correctly for any WMI Interface classes installed by the driver package. This has been done in the past by writing directly to the registry. A new syntax was added to Windows Server 2003 to provide a more convenient way of setting security on WMI Interfaces as follows:

 

    [install-section-name.WMI] |
    [install-section-name.nt.WMI] |
    [install-section-name.ntx86.WMI]
    [install-section-name.ntia64.WMI]
 
    WMIInterface={WmiClassGUID}, [flags], WMI-class-section
 
 

    [WMI-class-section]
    Security="security-descriptor-string"

This document accompanies and describes a redistributable co-installer that can be used to process the [DDInstall.WMI] install section in an INF. The [DDInstall.WMI] section is supported on Windows Server 2003 and later. The co-installer is only required to support this syntax on Windows 2000 and Windows XP.

USING THE CO-INSTALLER

To use the co-installer for driver installation and registration:

Copy the WMIInst.dll redistributable binary to the directory where you are assembling your driver package. You should use this following version of wmiinst.dll:

tools\coinstallers\<platform>\WMIInst.dll

To use this co-installer, add the following sections to the INF:

·         Add a [DDInstall.CoInstallers] section for each device specified in the INF. This section must include the following two lines:

AddReg = WMIInst.AddReg
CopyFiles= WMIInst.CopyFiles

For example:

[InstallA.NT.CoInstallers]
AddReg = WMIInst.AddReg
CopyFiles= WMIInst.CopyFiles

 ·         Add the following sections:

[WMIInst.AddReg]
HKR,,CoInstallers32,0x10000,"WMIInst.DLL,WmiGuidSecurityINF"

[WMIInst.CopyFiles]
WMIInst.dll,,,0x10

·         Add a reference to the CopyFiles section in the [DestinationDirs] section. For example:

[DestinationDirs]
WMIInst.CopyFiles = 11

·         Add sections to install the drivers and set WMI security.

File Manifest
FileDescription
WMIInst.htmDocumentation for this binary (this file).
<platform>\WMIInst.dllRedistributable 32-bit co-installer binary.

FEEDBACK

We welcome your comments, problem reports and wish-list requests. Please submit them by pointing your Internet browser to http://www.microsoft.com/ddk.

Top of page

© Microsoft Corporation 2002