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 "已經(jīng)啟動指定Web站點br>" End If elseif DoWhat=0 then '使用Stop停止站點 objServer.Stop If Err.Number > 0 Then Response.Write "無法停止指定Web站點br>" else Response.Write "已經(jīng)停止指定Web站點br>" End If end if End Function