'/*=========================================================================
'*Intro让IIS建立的站点默认是.net2.0的,而不是.net1.1的,没有使用WMI,所以在操作前先得停止IIS相关服务
'*FileNameChangeMetaBaseScriptMaps.vbs
'*Authoryongfa365
'*Versionv1.0
'*WEBhttp://www.yongfa365.com
'*Emailyongfa365[at]qq.com
'*FirstWritehttp://www.yongfa365.com/Item/ChangeMetaBaseScriptMaps.vbs.html
'*MadeTime2008-07-2417:38:20
'*LastModify2008-07-2417:38:20
'*==========================================================================*/
WScript.Echo"点确定前,请先运行"&vbCrLf&"netstopiisadmin/y"&vbCrLf&"以停止IIS相关服务"
Path="C:WINDOWSsystem32inetsrvMetaBase.xml"
Node="//configuration/MBProperty/IIsWebService"
SetXmlDom=CreateObject("MSXML2.DOMXmlDomument")
XmlDom.async=False
XmlDom.load(Path)
ScriptMaps=XmlDom.selectSingleNode(Node).getAttribute("ScriptMaps")
ScriptMaps=Replace(ScriptMaps,"v1.1.4322","v2.0.50727")
XmlDom.selectSingleNode(Node).setAttribute("ScriptMaps")=ScriptMaps
XmlDom.Save(Path)
WScript.Echo"OK,请运行"&vbCrLf&"iisreset"&vbCrLf&"重启IIS相关服务"