Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
5.5 KiB

  1. <HTML>
  2. <HEAD>
  3. <TITLE>Co-installer for Processing DDInstall.WMI</TITLE>
  4. <META content="text/html; charset=windows-1252" http-equiv=Content-Type>
  5. <META content="Microsoft FrontPage 5.0" name=GENERATOR>
  6. </HEAD>
  7. <BODY link=#0000ff><FONT face=Verdana size=5>
  8. <H2>Co-installer for Processing DDInstall.WMI</H2></FONT><FONT face=Verdana size=2>
  9. <P><SPAN style="COLOR: #ff0000; FONT-FAMILY: Arial; FONT-SIZE: 10pt">[This is
  10. preliminary documentation and subject to change.]</SPAN></P>
  11. <P><b><i style="mso-bidi-font-style:normal"><span style="font-size:9.5pt;mso-bidi-font-size:10.0pt;font-family:Arial">Abstract:
  12. </span></i></b>This document accompanies the redistributable co-installer that
  13. can be used inside an INF file to process the [<i><u>DDInstall</u></i>.WMI] on
  14. Windows 2000 and Windows XP. The functionality is already included in Windows
  15. Server 2003 and later.<H3>SUMMARY</H3>
  16. <p>It is crucial to set WMI security correctly for any WMI Interface classes
  17. installed by the driver package. This has been done in the past by writing
  18. directly to the registry. A new syntax was added to Windows Server 2003 to
  19. provide a more convenient way of setting security on WMI Interfaces as follows:<p>&nbsp;<p>
  20. <b>&nbsp;&nbsp;&nbsp; [</b><i>install-section-name</i><b>.WMI]</b> |<br>
  21. <b>&nbsp;&nbsp;&nbsp; [</b><i>install-section-name</i><b>.nt.WMI]</b> | <br>
  22. <b>&nbsp;&nbsp;&nbsp; [</b><i>install-section-name</i><b>.ntx86.WMI]</b> <br>
  23. <b>&nbsp;&nbsp;&nbsp; [</b><i>install-section-name</i><b>.ntia64.WMI]</b> <br>
  24. &nbsp;<br>
  25. <b>&nbsp;&nbsp;&nbsp; WMIInterface={</b><i>WmiClassGUID</i><b>},</b> [<i>flags</i>]<b>,</b>
  26. <i>WMI-class-section<br>
  27. </i><b>&nbsp;</b><br>
  28. <b>&nbsp;</b></p>
  29. <p><b>&nbsp;&nbsp;&nbsp; [</b><i>WMI-class-section</i><b>]</b> <br>
  30. <b>&nbsp;&nbsp;&nbsp; Security=&quot;</b><i>security-descriptor-string</i><b>&quot;</b>
  31. </p>
  32. <p>This document accompanies and describes a redistributable
  33. co-installer that can be used to process the <u>[</u><i>DDInstall</i>.WMI]
  34. install section in an INF. The [<i>DDInstall</i>.WMI] section is supported on
  35. Windows Server 2003 and later. The co-installer is only required to support
  36. this syntax on Windows 2000 and Windows XP.<H3>USING THE CO-INSTALLER</H3>
  37. <h5>To use the co-installer for driver installation and registration:</h5>
  38. <p style="margin-left:0in;tab-stops:.5in">Copy the WMIInst.dll redistributable binary to the directory
  39. where you are assembling your driver package. You should use this following
  40. version of wmiinst.dll:
  41. <blockquote>
  42. <p><b>tools\coinstallers\</b><i>&lt;platform&gt;</i><b>\WMIInst.dll</b></blockquote>
  43. <p>To use this co-installer, add the following sections to the INF:
  44. <p><span style="font-family:Symbol"><span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  45. </span></span>Add a [<i>DDInstall</i>.CoInstallers] section for each device
  46. specified in the INF. This section must include the following two lines:
  47. <blockquote>
  48. <p><style="margin-left:.5in">AddReg = WMIInst.AddReg<br>
  49. CopyFiles= WMIInst.CopyFiles
  50. </blockquote>
  51. <blockquote>
  52. <p><style="margin-left:.5in">For example:
  53. </blockquote>
  54. <blockquote>
  55. <p><style="margin-left:.5in">[InstallA.NT.CoInstallers]<br>
  56. AddReg = WMIInst.AddReg<br>
  57. CopyFiles= WMIInst.CopyFiles
  58. </blockquote>
  59. <p>&nbsp;<span style="font-family:Symbol"><span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  60. </span></span>Add the following sections:
  61. <blockquote>
  62. <p><style="margin-left:.5in">[WMIInst.AddReg]<br>
  63. HKR,,CoInstallers32,0x10000,&quot;WMIInst.DLL,WmiGuidSecurityINF&quot;<br style="mso-special-character:line-break">
  64. <br style="mso-special-character:line-break">
  65. <style="margin-left:.5in">[WMIInst.CopyFiles]<br>
  66. WMIInst.dll,,,0x10
  67. </blockquote>
  68. <p style="tab-stops:list .25in"><span style="font-family:Symbol"><span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  69. </span></span>Add a reference to the CopyFiles section in the [DestinationDirs]
  70. section. For example:
  71. <blockquote>
  72. <p><style="margin-left:.5in">[DestinationDirs]<br>
  73. WMIInst.CopyFiles = 11
  74. </blockquote>
  75. <p><span style="font-family:Symbol"><span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  76. </span></span>Add sections to install the drivers and set WMI security.<br style="mso-special-character:line-break">
  77. <br style="mso-special-character:line-break">
  78. File Manifest</FONT><FONT face="Courier" size="3"><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 width="744">
  79. <TR><TD width="200"><U>File</u></TD><TD width="534"><u>Description<u></TD></TR>
  80. <TR><TD width="200"><i><FONT face=Verdana size=2>
  81. WMIInst</FONT>.htm</i></TD><TD width="534">Documentation for this binary (this file).</TD></TR>
  82. <TR><TD width="200"><i>&lt;platform&gt;\WMIInst.dll</i></TD><TD width="534">Redistributable
  83. 32-bit co-installer binary.</TD></TR>
  84. </TABLE>
  85. <H3>FEEDBACK</H3>
  86. <P>We welcome your comments, problem reports and wish-list requests. Please
  87. submit them by pointing your Internet browser to <A href="http://www.microsoft.com/ddk">http://www.microsoft.com/ddk</A>.
  88. </FONT></P>
  89. <P align=center><FONT face=Verdana size=2><A href="#top">Top of page</A></P></FONT>
  90. <TABLE border=0" cellSpacing="0" width="624">
  91. <TR>
  92. <TD bgColor="#00ffff" height="2" vAlign="middle"></TD></TR></TABLE>
  93. <FONT face="MS Sans Serif" size=1>
  94. <P>� Microsoft Corporation 2002</FONT><FONT face=Verdana size=2>
  95. </P></FONT>
  96. </BODY>