让IIS建立的站点默认是.net 2.0的,而不是.net 1.1的代码
程序员文章站
2022-04-10 18:34:14
'/*========================================================================= &nbs...
'/*=========================================================================
' * 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相关服务"
上一篇: 利用sql语句复制一条或多条记录
下一篇: 详解js的作用域、预解析机制