Function AdminWebSite(Computer,WebSiteNum,DoWhat) On Error Resume Next Set objServer = GetObject("IIS://" Computer "/W3SVC/" WebSiteNum) If Err.Number > 0 Then Response.Write Now ". 错误码: " Hex(Err) " - " "无法开启指定站点br>" End If if Dowhat=1 then '使用Start启动站点 objServer.Start If Err.Number > 0 Then Response.Write "无法启动指定Web站点br>" else Response.Write "已经启动指定Web站点br>" End If elseif DoWhat=0 then '使用Stop停止站点 objServer.Stop If Err.Number > 0 Then Response.Write "无法停止指定Web站点br>" else Response.Write "已经停止指定Web站点br>" End If end if End Function