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.
 
 
 
 
 
 

196 lines
7.4 KiB

<!doctype html public "-//W3C//DTD HTML 4.0 Draft//EN">
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1251">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List href="./Registry_files/filelist.xml">
<title>WMI SDK Sample - Registry</title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>Michael Maston</o:Author>
<o:Template>Normal</o:Template>
<o:LastAuthor>Michael Maston</o:LastAuthor>
<o:Revision>5</o:Revision>
<o:TotalTime>172</o:TotalTime>
<o:Created>1999-06-11T21:06:00Z</o:Created>
<o:LastSaved>1999-07-15T22:50:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>145</o:Words>
<o:Characters>827</o:Characters>
<o:Company>Microsoft</o:Company>
<o:Lines>6</o:Lines>
<o:Paragraphs>1</o:Paragraphs>
<o:CharactersWithSpaces>1015</o:CharactersWithSpaces>
<o:Version>9.2720</o:Version>
</o:DocumentProperties>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Mincho";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"MS Mincho";
mso-font-charset:128;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:fixed;
mso-font-signature:1 134676480 16 0 131072 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"\@MS Mincho";
mso-font-charset:128;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-1610612033 1757936891 16 0 131231 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;
text-underline:single;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:2085059825;
mso-list-type:hybrid;
mso-list-template-ids:-224211296 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1027"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
<meta name=MS-HAID content=VJsamples>
</head>
<body bgcolor=white lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<table border=0 cellpadding=0 width="100%" style='width:100.0%;mso-cellspacing:
1.5pt;mso-padding-alt:0in 0in 0in 0in'>
<tr>
<td width=160 style='width:120.0pt;background:#330099;padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana;
color:white'>&nbsp;<nobr><b>Windows Management Instrumentation SDK Sample</b></span>
<o:p></o:p></p>
</td>
</tr>
</table>
<p class=MsoPlainText><br>
<strong><span style='font-size:13.5pt;font-family:Verdana'>Registry</span></strong><br>
<br>
<span style='font-family:Verdana;mso-fareast-font-family:"MS Mincho";
mso-bidi-font-family:"Times New Roman"'>This sample illustrates how to retrieve
registry data from WMI.<span style="mso-spacerun: yes">  </span>Note that the
accompanying MOF (registry.mof) must be compiled and loaded for this sample to
run correctly.<span style="mso-spacerun: yes">  </span>The MOF file contains
class definitions of the Registry keys to be read by the sample.<o:p></o:p></span></p>
<p class=MsoPlainText><span style='font-family:Verdana;mso-fareast-font-family:
"MS Mincho";mso-bidi-font-family:"Times New Roman"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
<p class=MsoPlainText><span style='font-size:12.0pt;mso-bidi-font-size:10.0pt;
font-family:Verdana'>Compiling the Registry MOF<o:p></o:p></span></p>
<p class=MsoPlainText>&nbsp;</p>
<p class=MsoPlainText><span style='font-family:Verdana'>The Registry MOF can be
compiled by doing the following:<o:p></o:p></span></p>
<p class=MsoPlainText><span style='font-family:Verdana'>&nbsp;<o:p></o:p></span></p>
<p class=MsoPlainText style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-family:Verdana'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span
style='font-family:Verdana'>At the command prompt, change directory to the
installation drive and directory of the Registry sample (e.g., D:\&gt;Program
Files\WMI\samples\Scripting\WSH\VBScript\Registry):<o:p></o:p></span></p>
<p class=MsoPlainText style='margin-left:.5in'><span style='font-family:Verdana'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
<p class=MsoPlainText style='margin-left:.5in'><b><span style='font-family:
Verdana'>CD “\Program Files\WMI\samples\Scripting\WSH\VBScript\Registry”<o:p></o:p></span></b></p>
<p class=MsoPlainText style='margin-left:.5in'><b><span style='font-family:
Verdana'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></b></p>
<p class=MsoPlainText style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-family:Verdana'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span
style='font-family:Verdana'>Once in the installation directory, compile the
Registry MOF using the WMI MOF compiler, MOFCOMP:<o:p></o:p></span></p>
<p class=MsoPlainText><span style='font-family:Verdana'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
<p class=MsoPlainText style='margin-left:.25in;text-indent:.25in'><b><span
style='font-family:Verdana'>MOFCOMP registry.mof<o:p></o:p></span></b></p>
<p class=MsoPlainText><span style='font-family:Verdana'>&nbsp;<o:p></o:p></span></p>
<p class=MsoPlainText><span style='font-family:Verdana'>Once the MOF is
compiled, the Registry script may be run and the results of the Registry query
will be displayed.<o:p></o:p></span></p>
<p class=MsoPlainText><span style='font-family:Verdana'>&nbsp;<o:p></o:p></span></p>
<p class=MsoNormal style='tab-stops:list .5in' l0 level1 lfo2 list .5in><span
style='font-family:Arial'><a href="http://www.microsoft.com/misc/CPYRIGHT.HTM"><b>©
1998-1999 Microsoft Corporation. All rights reserved.</b></a></span></p>
</div>
</body>
</html>