'/*=========================================================================
' * Intro 让IIS建立的站点默认是.net 2.0的,而不是.net 1.1的,没有使用WMI,所以在操作前先得停止IIS相关服务
' * FileName ChangeMetaBaseScriptMaps.vbs
' * Author yongfa365
' * Version v1.0
' * WEB http://www.yongfa365.com
' * Email yongfa365[at]qq.com
' * FirstWrite http://www.yongfa365.com/Item/ChangeMetaBaseScriptMaps.vbs.html
' * MadeTime 2008-07-24 17:38:20
' * LastModify 2008-07-24 17:38:20
' *==========================================================================*/
WScript.Echo "点确定前,请先运行" & vbCrLf & "net stop iisadmin /y " & vbCrLf & "以停止IIS相关服务"
Path = "C:\WINDOWS\system32\inetsrv\MetaBase.xml"
Node = "//configuration/MBProperty/IIsWebService"
Set XmlDom = 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相关服务"
' * Intro 让IIS建立的站点默认是.net 2.0的,而不是.net 1.1的,没有使用WMI,所以在操作前先得停止IIS相关服务
' * FileName ChangeMetaBaseScriptMaps.vbs
' * Author yongfa365
' * Version v1.0
' * WEB http://www.yongfa365.com
' * Email yongfa365[at]qq.com
' * FirstWrite http://www.yongfa365.com/Item/ChangeMetaBaseScriptMaps.vbs.html
' * MadeTime 2008-07-24 17:38:20
' * LastModify 2008-07-24 17:38:20
' *==========================================================================*/
WScript.Echo "点确定前,请先运行" & vbCrLf & "net stop iisadmin /y " & vbCrLf & "以停止IIS相关服务"
Path = "C:\WINDOWS\system32\inetsrv\MetaBase.xml"
Node = "//configuration/MBProperty/IIsWebService"
Set XmlDom = 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相关服务"
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“让IIS建立的站点默认是.net 2.0的,而不是.net 1.1的代码”评论...