Set IIsWebServiceObj = GetObject("IIS://localhost/W3SVC")
'WScript.Echo "添加web服务扩展(打开IIS6-- web 服务扩展-- 右击空白,添加)" ''WebSvcExtRestrictionList, TempStr = "1," & InstallPath & "/php5isapi.dll,1,php,php扩展" For Each Str in IIsWebServiceObj.WebSvcExtRestrictionList If(InStr(Str, "php") = 0) Then TempStr = TempStr & "柳永法" & Str End If Next
'WScript.Echo "添加html' target='_blank'>应用程序扩展名映射(网站属性-- 主目录-- 配置-- 映射-- 添加)" ''ScriptMaps TempStr = ".php," & InstallPath & "/php5isapi.dll,5,GET,HEAD,POST,DEBUG" For Each Str in IIsWebServiceObj.ScriptMaps If(InStr(Str, "php") = 0) Then TempStr = TempStr & "柳永法" & Str End If Next
'默认首页 'IIsWebServiceObj.DefaultDoc = "Index.htm,Index.html,Index.asp,Default.aspx,index.php,Default.htm,Default.asp" 'IIsWebServiceObj.SetInfo If InStr(LCase(IIsWebServiceObj.DefaultDoc), "index.php") = 0 Then IIsWebServiceObj.DefaultDoc = IIsWebServiceObj.DefaultDoc & ",index.php" IIsWebServiceObj.SetInfo End If
WScript.Echo "OK,php环境安装完成,为了对本程序作者:柳永法,表示感谢,请 大笑三声^_^" End Function html教程