<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[清风居-清风博客 - 脚本编程]]></title>
<link>http://www.qingfengju.com/</link>
<description><![CDATA[专注于计算机技术]]></description>
<language>zh-cn</language>
<copyright><![CDATA[Copyright 2005 PBlog3 v2.8]]></copyright>
<webMaster><![CDATA[dgx_lsyd3@163.com(淡月清风)]]></webMaster>
<generator>PBlog2 v2.4</generator> 
<image>
	<title>清风居-清风博客</title>
	<url>http://www.qingfengju.com/images/logos.gif</url>
	<link>http://www.qingfengju.com/</link>
	<description>清风居-清风博客</description>
</image>

			<item>
			<link>http://www.qingfengju.com/article.asp?id=180</link>
			<title><![CDATA[几个实用的注册表设置数据(右键进入命令行，Windows2000模式的搜索,)]]></title>
			<author>dgx_lsyd3@163.com(淡月清风)</author>
			<category><![CDATA[脚本编程]]></category>
			<pubDate>Mon,07 Dec 2009 10:30:18 +0800</pubDate>
			<guid>http://www.qingfengju.com/default.asp?id=180</guid>
		<description><![CDATA[<p><strong>1.在文件夹的右键菜单添加&ldquo;切换到MS-DOS命令行模式&rdquo;</strong><br />
Windows Registry Editor Version 5.00<br />
<br />
<span style="background-color: #ffcc99">[HKEY_CLASSES_ROOT\Folder\shell\DOS]</span><br />
@=&quot;切换到MS-DOS命令行模式&quot;</p>
<p><span style="background-color: #ffcc99">[HKEY_CLASSES_ROOT\Folder\shell\DOS\command]</span><br />
@=&quot;cmd.exe CD .&quot;</p>
<p><strong>2.在任意文件右键中添加&ldquo;用记事本打开&rdquo;<br />
</strong>Windows Registry Editor Version 5.00<br />
<br />
<span style="background-color: #ffcc99">[HKEY_CLASSES_ROOT\*\shell]</span></p>
<p><span style="background-color: #ffcc99">[HKEY_CLASSES_ROOT\*\shell\用记事本打开]</span></p>
<p><span style="background-color: #ffcc99">[HKEY_CLASSES_ROOT\*\shell\用记事本打开\command]</span><br />
@=&quot;\&quot;D:\\Program Files\\NotePad2\\Notepad2.exe\&quot; %1&quot;<br />
<br />
<strong>3.使用Windows 2000中简洁的搜索界面<br />
</strong>Windows Registry Editor Version 5.00<br />
<br />
<span style="background-color: #ffcc99">[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState]</span><br />
&quot;FullPath&quot;=dword:00000001<br />
&quot;Settings&quot;=hex:0c,00,02,00,0b,01,db,75,60,00,00,00<br />
&quot;FullPathAddress&quot;=dword:00000001<br />
&quot;use search asst&quot;=&quot;no&quot;<br />
<br />
<strong>4.一些显卡驱动装完了之后，会在桌面右键添加一些垃圾，可通过注册表删除,位置如下</strong><br />
HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\<br />
<br />
<strong>5.设置系统文件夹(桌面,我的文档等)的位置</strong><br />
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\<strong>User Shell Folders<br />
</strong>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\<strong>Shell Folders<br />
</strong>注意，这两个位置要同时修改。</p>]]></description>
		</item>
		
			<item>
			<link>http://www.qingfengju.com/article.asp?id=171</link>
			<title><![CDATA[DOS下CONFIG.SYS菜单的默认选项]]></title>
			<author>dgx_lsyd3@163.com(淡月清风)</author>
			<category><![CDATA[脚本编程]]></category>
			<pubDate>Wed,18 Nov 2009 09:22:00 +0800</pubDate>
			<guid>http://www.qingfengju.com/default.asp?id=171</guid>
		<description><![CDATA[<p><strong><span style="background-color: #ffcc99">[MENU]</span></strong><br />
MENUITEM=NONE,NONE<br />
MENUITEM=IDE,USE&nbsp;IDE...<br />
MENUDEFAULT=<span style="color: #ff0000">NONE</span>,<span style="color: #0000ff">10<br />
</span><span style="color: #339966"><span>;默认为NONE,等待10毫秒</span></span></p>]]></description>
		</item>
		
			<item>
			<link>http://www.qingfengju.com/article.asp?id=162</link>
			<title><![CDATA[在InstallShield中使用自定义函数和外部DLL中的函数]]></title>
			<author>dgx_lsyd3@163.com(淡月清风)</author>
			<category><![CDATA[脚本编程]]></category>
			<pubDate>Wed,14 Oct 2009 15:39:13 +0800</pubDate>
			<guid>http://www.qingfengju.com/default.asp?id=162</guid>
		<description><![CDATA[<div><b>1.</b><b>自定义函数</b></div>
<div>a) 函数声明</div>
<div><span style="color: blue">prototype string</span> <span style="color: maroon">GetString<span style="color: red">();</span></span></div>
<div>&nbsp;</div>
<div>b) 函数定义</div>
<div><span style="color: blue">function string</span> <span style="color: maroon">GetString <span style="color: red">()</span></span></div>
<div><span>&nbsp;&nbsp;&nbsp; <span style="color: blue">string</span> tmpString<span style="color: red">;</span></span></div>
<div><span style="color: blue">begin</span></div>
<div><span>&nbsp;&nbsp;&nbsp; tmpString<span style="color: red">=</span><span style="color: teal">&quot;</span></span><span style="color: teal">测试字符串！&quot;</span><span style="color: red">;</span></div>
<div>&nbsp;<span>&nbsp;&nbsp; <span style="color: blue">return</span> tmpString<span style="color: red">;</span></span></div>
<div><span style="color: blue">end</span>;</div>
<div>&nbsp;</div>
<div><b>2.</b><b>使用外部</b><b>dll</b><b>导出的函数</b></div>
<div>a) 声明函数(注意，严格区分大小写)</div>
<div><span style="color: blue">prototype stdcall BOOL</span> MyDll<span style="color: red">.<span style="color: maroon">Function1</span><span style="color: red">(</span><span style="color: blue">byref</span> <span style="color: blue">string</span><span style="color: red">);</span></span></div>
<div>&nbsp;</div>
<div>b) 将dll加载到内存</div>
<div><span style="color: maroon">UseDLL</span><span style="color: red">(&quot;</span><span style="color: teal">绝对路径</span><span style="color: teal">\\MyDll.dll&quot;</span><span style="color: red">);</span></div>
<div>&nbsp;</div>
<div>c) 调用函数</div>
<div>bReturn<span style="color: red">=MyDll<span style="color: red">.</span><span style="color: maroon">Function1</span><span style="color: red">(</span><span style="color: #000000">tmpString</span><span style="color: red">);</span></span></div>
<div>&nbsp;</div>
<div>d) 卸载dll</div>
<div><span style="color: maroon">UnUseDLL</span> <span style="color: red">(<font color="#008080">&quot;</font></span><span style="color: teal">绝对路径</span><span style="color: teal">\\MyDll.dll&quot;</span><span style="color: red">);</span></div>
<div>&nbsp;</div>]]></description>
		</item>
		
			<item>
			<link>http://www.qingfengju.com/article.asp?id=155</link>
			<title><![CDATA[一个比较好用的ASP/VBScript代码格式化工具VBSBeautifier]]></title>
			<author>dgx_lsyd3@163.com(淡月清风)</author>
			<category><![CDATA[脚本编程]]></category>
			<pubDate>Thu,10 Sep 2009 23:59:27 +0800</pubDate>
			<guid>http://www.qingfengju.com/default.asp?id=155</guid>
		<description><![CDATA[<p>不整齐，不美观的ASP/VBScript代码，叫这个梳子梳一下就OK了。<br />
<img alt="" src="http://www.qingfengju.com/download.asp?id=40" />这个软件界面的字体是Courier，不喜欢看，于是把他和谐了一下：</p>
<div><b>1.</b><b>在IDA</b><b>中打开VBSBeautifier.exe</b><b>，找到如下位置：</b></div>
<div>.text:00402BF4<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; push&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; eax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: green">; int</span></span></div>
<div>.text:00402BF5<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; push&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; offset s_Courier&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: green">; &quot;Courier&quot;</span></span></div>
<div>.text:00402BFA<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; push&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 6Eh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: green">; int</span></span></div>
<div>.text:00402BFC<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mov&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; byte ptr [esp+20h+var_4], 1</span></div>
<div>.text:00402C01<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mov&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; dword ptr [esi], offset off_433F28</span></div>
<div style="margin: 0cm 0cm 0pt 152.25pt; text-indent: -152.25pt">.text:00402C07&nbsp;<span>&nbsp;&nbsp;&nbsp;&nbsp;call&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue">CFont</span><span style="color: red">::</span><span style="color: maroon">CreatePointFont</span><span style="color: red">(</span><br />
<span style="color: blue">int</span>,<span style="color: blue">char const</span> <span style="color: red">*,</span><span style="color: blue">CDC</span> <span style="color: red">*)</span></span></div>
<div>&nbsp;</div>
<div><b>2.</b><b>找到s_Courier</b><b>的地址：<br />
</b>.data:00440240 ; char s_Courier[]</div>
<div>&nbsp;</div>
<div>用WinHex之类的二进制编辑器，打开VBSBeautifier.exe，找到地址<b>40240</b> (00440240 - 400000)，修改成自己喜欢的字体(Tahoma)。</div>
<div>&nbsp;</div>
<div>注意<b>40240</b>这里是：43 6F 75 72 69 65 72 00，除了末尾的&rsquo;\0&rsquo;，只有7个字符可用。</div>
<div><a href="http://www.qingfengju.com/download.asp?id=41"><img alt="" border="0" style="margin: 0px 2px -4px 0px" src="http://www.qingfengju.com/images/download.gif" />点击下载修改后的文件</a><br />
&nbsp;</div>
<div><b>3.</b><b>其它</b></div>
<div>刚发现这个软件的核心部分现在开源(Perl脚本)了囧囧囧。</div>
<div><a target="_blank" href="http://www.daansystems.com/vbsbeaut/">http://www.daansystems.com/vbsbeaut/</a></div>
<div>&nbsp;</div>]]></description>
		</item>
		
			<item>
			<link>http://www.qingfengju.com/article.asp?id=145</link>
			<title><![CDATA[在脚本中创建窗体]]></title>
			<author>dgx_lsyd3@163.com(淡月清风)</author>
			<category><![CDATA[脚本编程]]></category>
			<pubDate>Sat,22 Aug 2009 01:21:54 +0800</pubDate>
			<guid>http://www.qingfengju.com/default.asp?id=145</guid>
		<description><![CDATA[<div align="left"><span style="font-size: 9pt; color: blue">Set</span><span style="font-size: 9pt"> <span style="color: black">ie</span><span style="color: red">=</span><span style="color: black">CreateObject</span>(<span style="color: teal">&quot;InternetExplorer.Application&quot;</span>)</span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Visible</span><span style="color: red">=</span><span style="color: blue">False</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">AddressBar</span><span style="color: red">=</span><span style="color: blue">False</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">MenuBar</span><span style="color: red">=</span><span style="color: blue">False</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">StatusBar</span><span style="color: red">=</span><span style="color: blue">False</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">ToolBar</span><span style="color: red">=</span><span style="color: blue">False</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Resizable</span><span style="color: red">=</span><span style="color: blue">true</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Left</span><span style="color: red">=300</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Top</span><span style="color: red">=200</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Width</span><span style="color: red">=300</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Height</span><span style="color: red">=240</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Silent</span><span style="color: red">=</span><span style="color: blue">True</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Navigate</span> <span style="color: teal">&quot;about:blank&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Document</span>.<span style="color: black">Title</span><span style="color: red">=</span><span style="color: teal">&quot;VBScript </span></span><span style="font-size: 9pt; color: teal">创建的窗口</span><span style="font-size: 9pt; color: teal">&quot;</span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Document</span>.<span style="color: black">body</span>.<span style="color: black">bgColor</span><span style="color: red">=</span><span style="color: teal">&quot;#ECE9D8&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Document</span>.<span style="color: black">body</span>.<span style="color: black">style</span>.<span style="color: black">overflow</span><span style="color: red">=</span><span style="color: teal">&quot;hidden&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Document</span>.<span style="color: black">body</span>.<span style="color: black">style</span>.<span style="color: black">borderWidth</span><span style="color: red">=</span><span style="color: teal">&quot;0&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Document</span>.<span style="color: black">body</span>.<span style="color: black">innerHtml</span><span style="color: red">=</span><span style="color: teal">&quot;&lt;b&gt;VBScript&lt;/b&gt;</span></span><span style="font-size: 9pt; color: teal">创建的窗口测试！！</span><span style="font-size: 9pt; color: teal">&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&quot;</span><span style="font-size: 9pt"> <span style="color: red">&amp;</span> _</span></div>
<div align="left"><span style="font-size: 9pt; color: teal">&quot;&lt;p align='center'&gt;&lt;input type='button' onclick=&rdquo;</span><span style="font-size: 9pt"> <span style="color: red">&amp;</span> _</span></div>
<div align="left"><span style="font-size: 9pt; color: teal">&rdquo;'vbscript:msgbox(&quot;&quot;</span><span style="font-size: 9pt; color: teal">单击事件测试！</span><span style="font-size: 9pt; color: teal">&quot;&quot;)' value='</span><span style="font-size: 9pt; color: teal">单击这里关闭</span><span style="font-size: 9pt; color: teal">'/&gt;&lt;/p&gt;&quot;</span></div>
<div align="left"><span style="font-size: 9pt; color: black">ie</span><span style="font-size: 9pt">.<span style="color: black">Visible</span><span style="color: red">=</span><span style="color: blue">True<br />
<br />
</span><span style="color: #000000"><strong><span>效果如下：</span></strong></span></span></div>
<p><img alt="" src="http://www.qingfengju.com/download.asp?id=22" /><br />
<br />
&nbsp;</p>]]></description>
		</item>
		
			<item>
			<link>http://www.qingfengju.com/article.asp?id=143</link>
			<title><![CDATA[将默认浏览器设置为自己的浏览器需要的全部注册表项]]></title>
			<author>dgx_lsyd3@163.com(淡月清风)</author>
			<category><![CDATA[脚本编程]]></category>
			<pubDate>Tue,18 Aug 2009 00:21:40 +0800</pubDate>
			<guid>http://www.qingfengju.com/default.asp?id=143</guid>
		<description><![CDATA[<div align="left"><span style="color: #000000"><span style="font-size: 9pt">将默认浏览器设置为自己的浏览器</span><span style="font-size: 9pt">MultipageIe</span><span style="font-size: 9pt">需要的全部注册表项：</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">'</span><span style="font-size: 9pt; color: green">默认设置为</span><span style="font-size: 9pt; color: green">&quot;open&quot;</span></div>
<div align="left"><span style="font-size: 9pt; color: black">DEF_Browser</span><span style="font-size: 9pt; color: red">=</span><span style="font-size: 9pt; color: teal">&quot;MultipageIe&quot;</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">'</span><span style="font-size: 9pt; color: green">默认设置为</span><span style="font-size: 9pt; color: green">&quot;IEXPLORE.EXE&quot;</span></div>
<div align="left"><span style="font-size: 9pt; color: black">DEF_BrowserExeName</span><span style="font-size: 9pt; color: red">=</span><span style="font-size: 9pt; color: teal">&quot;MULTIPAGEIE.EXE&quot;</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">'</span><span style="font-size: 9pt; color: green">默认设置为</span><span style="font-size: 9pt; color: green">&quot;C:\Program Files\internet explorer\iexplore.exe&quot;</span></div>
<div align="left"><span style="font-size: 9pt; color: black">DEF_BrowserExePath</span><span style="font-size: 9pt; color: red">=</span><span style="font-size: 9pt; color: teal">&quot;E:\</span><span style="font-size: 9pt; color: teal">VC++</span><span style="font-size: 9pt; color: teal">案例</span><span style="font-size: 9pt; color: teal">\MultipageIe\MultipageIe.exe&quot;</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">'</span><span style="font-size: 9pt; color: green">默认设置为</span><span style="font-size: 9pt; color: green">&quot;Internet Explorer&quot;</span></div>
<div align="left"><span style="font-size: 9pt; color: black">DEF_BrowserLocalizedString</span><span style="font-size: 9pt; color: red">=</span><span style="font-size: 9pt; color: teal">&quot;MultipageIe Web Explorer&quot;</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: blue">Set</span><span style="font-size: 9pt"> <span style="color: black">WshShell</span> <span style="color: red">=</span> <span style="color: black">WScript</span>.<span style="color: black">CreateObject</span>(<span style="color: teal">&quot;WScript.Shell&quot;</span>)</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\.htm\&quot;</span>,<span style="color: teal">&quot;htmlfile&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\.html\&quot;</span>,<span style="color: teal">&quot;htmlfile&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\.shtm\&quot;</span>,<span style="color: teal">&quot;htmlfile&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\.shtml\&quot;</span>,<span style="color: teal">&quot;htmlfile&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\.mht\&quot;</span>,<span style="color: teal">&quot;mhtmlfile&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\.mhtml\&quot;</span>,<span style="color: teal">&quot;mhtmlfile&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\.url\&quot;</span>,<span style="color: teal">&quot;InternetShortcut&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\htmlfile\shell\&quot;</span>,<span style="color: teal">&quot;open&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\htmlfile\shell\&quot;</span>,<span style="color: black">DEF_Browser</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\htmlfile\shell\open\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\htmlfile\shell\&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_Browser</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\InternetShortcut\shell\&quot;</span>,<span style="color: black">DEF_Browser</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\InternetShortcut\shell\open\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\InternetShortcut\shell\&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_Browser</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\mhtmlfile\shell\&quot;</span>,<span style="color: black">DEF_Browser</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\mhtmlfile\shell\open\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\mhtmlfile\shell\&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_Browser</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\http\shell\&quot;</span>,<span style="color: black">DEF_Browser</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\http\shell\open\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\http\shell\&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_Browser</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\https\shell\&quot;</span>,<span style="color: black">DEF_Browser</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\https\shell\open\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\https\shell\&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_Browser</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\file\shell\&quot;</span>,<span style="color: black">DEF_Browser</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\file\shell\open\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\file\shell\&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_Browser</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\ftp\shell\&quot;</span>,<span style="color: black">DEF_Browser</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\ftp\shell\open\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\ftp\shell\&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_Browser</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;\command\&quot;</span>,<span style="color: teal">&quot;&quot;&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;&quot; &quot;&quot;%1&quot;&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKCR\CLSID\{0002DF01-0000-0000-C000-000000000046}\LocalServer32\&quot;</span>,<span style="color: teal">&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKLM\SOFTWARE\Clients\StartMenuInternet\&quot;</span>,<span style="color: black">DEF_BrowserExeName</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKLM\SOFTWARE\Clients\StartMenuInternet\&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExeName</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;\LocalizedString&quot;</span>,<span style="color: black">DEF_BrowserLocalizedString</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKLM\SOFTWARE\Clients\StartMenuInternet\&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExeName</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;\shell\open\command\&quot;</span>,<span style="color: teal">&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKLM\SOFTWARE\TENCENT\Traveler\exe&quot;</span>,<span style="color: teal">&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">RegWrite</span> <span style="color: teal">&quot;HKLM\SOFTWARE\TENCENT\Traveler\exeOld&quot;</span>,<span style="color: teal">&quot;&quot;</span> <span style="color: red">&amp;</span> <span style="color: black">DEF_BrowserExePath</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;&quot;</span>,<span style="color: teal">&quot;REG_SZ&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">Run</span> <span style="color: teal">&quot;Rundll32.exe User32.dll,UpdatePerUserSystemParameters&quot;</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WshShell</span><span style="font-size: 9pt">.<span style="color: black">Popup</span> <span style="color: teal">&quot;</span></span><span style="font-size: 9pt; color: teal">设置完成。</span><span style="font-size: 9pt; color: teal">&quot;</span><span style="font-size: 9pt">,<span style="color: red">10</span>,<span style="color: teal">&quot;</span></span><span style="font-size: 9pt; color: teal">提示</span><span style="font-size: 9pt; color: teal">&quot;</span><span style="font-size: 9pt">,<span style="color: red">64</span></span></div>
<div align="left">&nbsp;</div>
<div>&nbsp;</div>]]></description>
		</item>
		
			<item>
			<link>http://www.qingfengju.com/article.asp?id=115</link>
			<title><![CDATA[REGEDIT.EXE的命令行参数]]></title>
			<author>dgx_lsyd3@163.com(淡月清风)</author>
			<category><![CDATA[脚本编程]]></category>
			<pubDate>Thu,09 Jul 2009 10:15:44 +0800</pubDate>
			<guid>http://www.qingfengju.com/default.asp?id=115</guid>
		<description><![CDATA[<p><a target="_blank" href="http://support.microsoft.com/kb/82821/zh-cn">http://support.microsoft.com/kb/82821/zh-cn</a><br />
<br />
语法 REGEDIT.EXE<br />
REGEDIT [/v|-v] [/s|-s] &lt;FILENAME&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&lt;filename&gt;<br />
这是 REGEDIT.EXE 的一个.REG 格式设置为文件的文件菜单中以高级模式保存登记文件命令内可以生产。 <br />
<br />
[/ v| v]<br />
此开关以注册数据库在树状结构 （类似于在 Windows 3.1 文件管理器在树状窗口） 中的显示位置的高级模式打开 REGEDIT.EXE。 可以编辑数据库的任何一部分。 <br />
<br />
[/ s| s]<br />
在命令行上指定一个文件名时, 此开关用于取消通常会显示任何信息对话框。 这时应用程序的安装程序要使用一个.REG 文件执行 REGEDIT.EXE，但不是会希望用户弄混用显示任何对话框。 <br />
<br />
开关的语法<br />
&quot;/&quot;或&quot;-&quot;可用于表示可选开关。 这些开关可以组合 （例如-与），并键入大写或小写。 忽略无法识别的开关。<br />
&nbsp;<br />
另来自<a target="_blank" href="http://blog.csdn.net/lixianlin/archive/2007/05/15/1610432.aspx">http://blog.csdn.net/lixianlin/archive/2007/05/15/1610432.aspx</a>：<br />
<span style="color: #0000ff">REGEDIT </span>[/L:system] [/R:user] filename1 <br />
<span style="color: #0000ff">REGEDIT </span>[/L:system] [/R:user] /C filename2 <br />
<span style="color: #0000ff">REGEDIT </span>[/L:system] [/R:user] /E filename3 [regpath1] <br />
<span style="color: #0000ff">REGEDIT </span>[/L:system] [/R:user] /D regpath2 <br />
<span style="color: #339966">/L:system Specifies the location of SYSTEM.DAT file. <br />
/R:user Specifies the location of USER.DAT file. <br />
filenamel Specifies the file(s) to import into the registry. <br />
/C filename2 Specifies the file to creat the registry from.. <br />
/E filename3 Specifies the file to export the registry to. <br />
regpath1 Specifies the starting registry key to export from(Defaults to exporting the entire registry). <br />
/D regpath2 Specifies the registry key to delete.</span><br />
<br />
&nbsp;</p>]]></description>
		</item>
		
			<item>
			<link>http://www.qingfengju.com/article.asp?id=98</link>
			<title><![CDATA[Windows下常用脚本(Microsoft TechNet：脚本中心)]]></title>
			<author>dgx_lsyd3@163.com(淡月清风)</author>
			<category><![CDATA[脚本编程]]></category>
			<pubDate>Sun,28 Jun 2009 14:44:03 +0800</pubDate>
			<guid>http://www.qingfengju.com/default.asp?id=98</guid>
		<description><![CDATA[<p><a target="_blank" href="http://technet.microsoft.com/zh-cn/library/dd638440.aspx">http://technet.microsoft.com/zh-cn/library/dd638440.aspx</a><br />
<br />
&nbsp;</p>]]></description>
		</item>
		
			<item>
			<link>http://www.qingfengju.com/article.asp?id=90</link>
			<title><![CDATA[Force a script to run in CSCRIPT]]></title>
			<author>dgx_lsyd3@163.com(淡月清风)</author>
			<category><![CDATA[脚本编程]]></category>
			<pubDate>Mon,22 Jun 2009 23:03:35 +0800</pubDate>
			<guid>http://www.qingfengju.com/default.asp?id=90</guid>
		<description><![CDATA[<div align="left"><span style="font-size: 9pt; color: green">'Force a script to run in CSCRIPT</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">'There are several valid reasons to demand that a script runs in CSCRIPT instead of WSCRIPT, </span></div>
<div align="left"><span style="font-size: 9pt; color: green">'like for example to allow the use of Standard Input or to prevent a separate popup for each WScript.Echo line.</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">'The following code can be copied and pasted at the top of your own scripts to force them to run in CSCRIPT:</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: blue">Dim</span><span style="font-size: 9pt"> <span style="color: #010001">strArgs</span>, <span style="color: #010001">strCmd</span>, <span style="color: #010001">strEngine</span>, <span style="color: #010001">i</span>, <span style="color: #010001">objDebug</span>, <span style="color: #010001">wshShell</span></span></div>
<div align="left"><span style="font-size: 9pt; color: blue">Set</span><span style="font-size: 9pt"> <span style="color: #010001">wshShell</span> = <span style="color: #800000">CreateObject</span>( <span style="color: teal">&quot;WScript.Shell&quot;</span> )</span></div>
<div align="left"><span style="font-size: 9pt; color: #010001">strEngine</span><span style="font-size: 9pt"> = <span style="color: #800000">UCase</span>( <span style="color: #800000">Right</span>( <span style="color: #010001">WScript</span>.<span style="color: #010001">FullName</span>, <span style="color: red">12</span> ) )</span></div>
<div align="left"><span style="font-size: 9pt; color: blue">If</span><span style="font-size: 9pt"> <span style="color: #010001">strEngine</span> &lt;&gt; <span style="color: teal">&quot;\CSCRIPT.EXE&quot;</span> <span style="color: blue">Then</span></span></div>
<div align="left"><span style="font-size: 9pt; color: green">' Recreate the list of command line arguments</span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp; <span style="color: #010001">strArgs</span> = <span style="color: teal">&quot;&quot;</span></span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp; <span style="color: blue">If</span> <span style="color: #010001">WScript</span>.<span style="color: #010001">Arguments</span>.<span style="color: #010001">Count</span> &gt; <span style="color: red">0</span> <span style="color: blue">Then</span></span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue">For</span> <span style="color: #010001">i</span> = <span style="color: red">0</span> <span style="color: blue">To</span> <span style="color: #010001">WScript</span>.<span style="color: #010001">Arguments</span>.<span style="color: #010001">Count</span></span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #010001">strArgs</span> = <span style="color: #010001">strArgs</span> &amp; <span style="color: teal">&quot; &quot;</span> &amp; <span style="color: #010001">WScript</span>.<span style="color: #010001">Arguments</span>(<span style="color: #010001">i</span>)</span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue">Next</span></span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp; <span style="color: blue">End</span> <span style="color: blue">If</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">' Create the complete command line to rerun this script in CSCRIPT</span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp; <span style="color: #010001">strCmd</span> = <span style="color: teal">&quot;CSCRIPT.EXE //NoLogo &quot;&quot;&quot;</span> &amp; <span style="color: #010001">WScript</span>.<span style="color: #010001">ScriptFullName</span> &amp; <span style="color: teal">&quot;&quot;&quot;&quot;</span> &amp; <span style="color: #010001">strArgs</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">' Rerun the script in CSCRIPT</span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp; <span style="color: blue">Set</span> <span style="color: #010001">objDebug</span> = <span style="color: #010001">wshShell</span>.<span style="color: #010001">Exec</span>( <span style="color: #010001">strCmd</span> )</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">' Wait until the script exits</span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp; <span style="color: blue">Do</span> <span style="color: blue">While</span> <span style="color: #010001">objDebug</span>.<span style="color: #010001">Status</span> = <span style="color: red">0</span></span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #010001">WScript</span>.<span style="color: #010001">Sleep</span> <span style="color: red">100</span></span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp; <span style="color: blue">Loop</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">' Exit with CSCRIPT's return code</span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp; <span style="color: #010001">WScript</span>.<span style="color: #010001">Quit</span> <span style="color: #010001">objDebug</span>.<span style="color: #010001">ExitCode</span></span></div>
<div align="left"><span style="font-size: 9pt; color: blue">End</span><span style="font-size: 9pt"> <span style="color: blue">If</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">'The code may look more complicated than necessary, that's because it returns CSCRIPT's return code </span></div>
<div align="left"><span style="font-size: 9pt; color: green">'to the WSCRIPT engine, just in case this return code is monitored by the program that started the script in WSCRIPT.</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">'In case you want to force a script to run in WSCRIPT instead, just substitute WSCRIPT.EXE for CSCRIPT.EXE.</span><br />
<br />
&nbsp;</div>]]></description>
		</item>
		
			<item>
			<link>http://www.qingfengju.com/article.asp?id=60</link>
			<title><![CDATA[通过一个具体实例来理解WMI脚本编程-读取BIOS信息]]></title>
			<author>dgx_lsyd3@163.com(淡月清风)</author>
			<category><![CDATA[脚本编程]]></category>
			<pubDate>Mon,01 Jun 2009 10:58:18 +0800</pubDate>
			<guid>http://www.qingfengju.com/default.asp?id=60</guid>
		<description><![CDATA[<p><span style="font-size: 9pt; color: blue">Option</span><span style="font-size: 9pt"> <span style="color: blue">Explicit</span></span></p>
<div align="left"><span style="font-size: 9pt; color: green">'WMI</span><span style="font-size: 9pt; color: green">对象模型以及参考手册在</span><span style="font-size: 9pt; color: green">MSDN2001</span><span style="font-size: 9pt; color: green">中的位置：</span></div>
<div align="left"><span style="font-size: 9pt; color: green">'Platform SDK</span></div>
<div align="left"><span style="font-size: 9pt; color: green">'&nbsp;&nbsp; -&gt;Setup and System Administration</span></div>
<div align="left"><span style="font-size: 9pt; color: green">'&nbsp;&nbsp; -&gt;Windows Management Instrumentation</span></div>
<div align="left"><span style="font-size: 9pt; color: green">'&nbsp;&nbsp; -&gt;WMI Reference</span></div>
<div align="left"><span style="font-size: 9pt; color: green">'&nbsp;&nbsp; -&gt;Scripting API for WMI<br />
<br />
'对于Visual Stdio 2008：<br />
'ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.chs/wmisdk/wmi/wmi_start_page.htm</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">'SWbemLocator</span><span style="font-size: 9pt; color: green">类用来连接</span><span style="font-size: 9pt; color: green">WMI</span><span style="font-size: 9pt; color: green">，并返回</span><span style="font-size: 9pt; color: green">WbemServices</span><span style="font-size: 9pt; color: green">对象</span></div>
<div align="left"><span style="font-size: 9pt; color: blue">Dim</span><span style="font-size: 9pt"> <span style="color: black">objSWbemLocator</span></span></div>
<div align="left"><span style="font-size: 9pt; color: blue">Set</span><span style="font-size: 9pt"> <span style="color: black">objSWbemLocator</span><span style="color: red">=</span><span style="color: black">CreateObject</span>(<span style="color: teal">&quot;WbemScripting.SWbemLocator&quot;</span>)</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">'WbemServices</span><span style="font-size: 9pt; color: green">类用来执行命名空间下的各种操作</span></div>
<div align="left"><span style="font-size: 9pt; color: blue">Dim</span><span style="font-size: 9pt"> <span style="color: black">objSWbemServices</span></span></div>
<div align="left"><span style="font-size: 9pt; color: green">'</span><span style="font-size: 9pt; color: green">命名空间和类可以用</span><span style="font-size: 9pt; color: green">WMI Object Browser</span><span style="font-size: 9pt; color: green">来查看</span><span style="font-size: 9pt; color: green">,WMI Object Browser</span><span style="font-size: 9pt; color: green">是</span><span style="font-size: 9pt; color: green">WMI Tools</span><span style="font-size: 9pt; color: green">中的一部分。</span></div>
<div align="left"><span style="font-size: 9pt; color: green">'</span><span style="font-size: 9pt; color: green">下载地址：</span><span style="font-size: 9pt; color: green"><a target="_blank" href="http://www.microsoft.com/downloads/details.aspx?familyid=6430F853-1120-48DB-8CC5-F2ABDC3ED314&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?familyid=6430F853-1120-48DB-8CC5-F2ABDC3ED314&amp;displaylang=en</a></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">'</span><span style="font-size: 9pt; color: green">通过</span><span style="font-size: 9pt; color: green">ConnectServer</span><span style="font-size: 9pt; color: green">连接到本机</span><span style="font-size: 9pt; color: green">(.)</span></div>
<div align="left"><span style="font-size: 9pt; color: green">'root\CIMV2</span><span style="font-size: 9pt; color: green">命名空间下有</span><span style="font-size: 9pt; color: green">Windows</span><span style="font-size: 9pt; color: green">的各种软件，硬件信息</span></div>
<div align="left"><span style="font-size: 9pt; color: blue">Set</span><span style="font-size: 9pt"> <span style="color: black">objSWbemServices</span><span style="color: red">=</span><span style="color: black">objSWbemLocator</span>.<span style="color: black">ConnectServer</span>(<span style="color: teal">&quot;.&quot;</span>,<span style="color: teal">&quot;root\CIMV2&quot;</span>)</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">'SWbemObjectSet</span><span style="font-size: 9pt; color: green">类是</span><span style="font-size: 9pt; color: green">SWbemObject</span><span style="font-size: 9pt; color: green">对象的集合</span></div>
<div align="left"><span style="font-size: 9pt; color: blue">Dim</span><span style="font-size: 9pt"> <span style="color: black">objSWbemObjectSet</span></span></div>
<div align="left"><span style="font-size: 9pt; color: green">'</span><span style="font-size: 9pt; color: green">除了使用</span><span style="font-size: 9pt; color: green">InstancesOf</span><span style="font-size: 9pt; color: green">之外，还可以使用</span><span style="font-size: 9pt; color: green">SWbemServices.ExecQuery</span><span style="font-size: 9pt; color: green">方法，</span><span style="font-size: 9pt; color: green">ExecQuery</span><span style="font-size: 9pt; color: green">方法支持</span><span style="font-size: 9pt; color: green">WQL</span><span style="font-size: 9pt; color: green">查询语言。</span></div>
<div align="left"><span style="font-size: 9pt; color: green">'WQL</span><span style="font-size: 9pt; color: green">查询语言具有与</span><span style="font-size: 9pt; color: green">SQL</span><span style="font-size: 9pt; color: green">一致的语法，非常强大</span></div>
<div align="left"><span style="font-size: 9pt; color: green">'</span><span style="font-size: 9pt; color: green">我们可以形象的认为每个</span><span style="font-size: 9pt; color: green">WMI</span><span style="font-size: 9pt; color: green">对象都是一个数据库的</span><span style="font-size: 9pt; color: green">&ldquo;</span><span style="font-size: 9pt; color: green">表</span><span style="font-size: 9pt; color: green">&rdquo;</span></div>
<div align="left"><span style="font-size: 9pt; color: green">'</span><span style="font-size: 9pt; color: green">比如这里我们可以用</span><span style="font-size: 9pt; color: green">&quot;Select * From Win32_BIOS<span style="font-size: 9pt; color: green">&quot;。</span></span></div>
<div align="left"><span style="font-size: 9pt; color: blue">Set</span><span style="font-size: 9pt"> <span style="color: black">objSWbemObjectSet</span><span style="color: red">=</span><span style="color: black">objSWbemServices</span>.<span style="color: black">InstancesOf</span>(<span style="color: teal">&quot;Win32_BIOS&quot;</span>)</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: blue">Dim</span><span style="font-size: 9pt"> <span style="color: black">strBiosInfo</span></span></div>
<div align="left"><span style="font-size: 9pt; color: black">strBiosInfo</span><span style="font-size: 9pt; color: red">=</span><span style="font-size: 9pt; color: teal">&quot;&quot;</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: green">'SWbemObject</span><span style="font-size: 9pt; color: green">用来表示一个</span><span style="font-size: 9pt; color: green">WMI</span><span style="font-size: 9pt; color: green">对象</span></div>
<div align="left"><span style="font-size: 9pt; color: green">'</span><span style="font-size: 9pt; color: green">在这里它是一个</span><span style="font-size: 9pt; color: green">Win32_BIOS</span><span style="font-size: 9pt; color: green">实例，就是说</span><span style="font-size: 9pt; color: green">objSWbemObject</span><span style="font-size: 9pt; color: green">就是一个</span><span style="font-size: 9pt; color: green">Win32_BIOS</span><span style="font-size: 9pt; color: green">类的对象</span></div>
<div align="left"><span style="font-size: 9pt; color: blue">Dim</span><span style="font-size: 9pt"> <span style="color: black">objSWbemObject</span></span></div>
<div align="left"><span style="font-size: 9pt; color: blue">For</span><span style="font-size: 9pt"> <span style="color: blue">Each</span> <span style="color: black">objSWbemObject</span> <span style="color: blue">In</span> <span style="color: black">objSWbemObjectSet</span></span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp; <span style="color: green">'</span></span><span style="font-size: 9pt; color: green">下面我们输出</span><span style="font-size: 9pt; color: green">Win32_BIOS</span><span style="font-size: 9pt; color: green">的各种属性</span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp; <span style="color: black">strBiosInfo</span> <span style="color: red">=</span> <span style="color: black">strBiosInfo</span> <span style="color: red">&amp;</span> <span style="color: teal">&quot;Name: &quot;</span> <span style="color: red">&amp;</span> <span style="color: black">objSWbemObject</span>.<span style="color: black">Name</span> <span style="color: red">&amp;</span> <span style="color: black">VbCrLf</span> _</span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: red">&amp;</span> <span style="color: teal">&quot;Manufacturer: &quot;</span> <span style="color: red">&amp;</span> <span style="color: black">objSWbemObject</span>.<span style="color: black">Manufacturer</span> <span style="color: red">&amp;</span> <span style="color: black">VbCrLf</span> _</span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: red">&amp;</span> <span style="color: teal">&quot;Version: &quot;</span> <span style="color: red">&amp;</span> <span style="color: black">objSWbemObject</span>.<span style="color: black">Version</span> <span style="color: red">&amp;</span> <span style="color: black">VbCrLf</span> _</span></div>
<div align="left"><span style="font-size: 9pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red">&amp;</span> <span style="color: teal">&quot;CurrentLanguage: &quot;</span> <span style="color: red">&amp;</span> <span style="color: black">objSWbemObject</span>.<span style="color: black">CurrentLanguage</span></span></div>
<div align="left"><span style="font-size: 9pt; color: blue">Next</span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="font-size: 9pt; color: black">WScript</span><span style="font-size: 9pt">.<span style="color: black">Echo</span> <span style="color: black">strBiosInfo</span></span></div>
<div align="left">&nbsp;</div>
<div align="left"><span style="color: #000000"><strong><span style="font-size: 9pt">在我的系统上输出：</span></strong></span></div>
<div align="left"><span style="font-family: Courier New"><span style="color: #000000"><strong><span style="font-size: 9pt">Name: Award Modular BIOS v6.00PG</span></strong></span></span></div>
<div align="left"><span style="font-family: Courier New"><span style="color: #000000"><strong><span style="font-size: 9pt">Manufacturer: Award Software International, Inc.</span></strong></span></span></div>
<div align="left"><span style="font-family: Courier New"><span style="color: #000000"><strong><span style="font-size: 9pt">Version: GBT - 42302e31</span></strong></span></span></div>
<div><span style="font-family: Courier New"><span style="color: #000000"><strong><span style="font-size: 9pt">CurrentLanguage: n|US|iso8859-1</span></strong></span></span></div>
<p><br />
&nbsp;</p>]]></description>
		</item>
		
</channel>
</rss>
