• <sub id="h4knl"><ol id="h4knl"></ol></sub>
    <sup id="h4knl"></sup>
      <sub id="h4knl"></sub>

      <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
      1. <strong id="h4knl"></strong>

      2. vbscript自動配置IIS代碼

        時間:2024-09-15 02:22:07 VBScript 我要投稿
        • 相關推薦

        vbscript自動配置IIS代碼

          復制代碼 代碼如下:

          strServerName=""localhost""

          strRootPath=""g:documents""'虛擬目錄路徑

          strVRName=""Test""'虛擬目錄名稱

          strDefaultDoc=""index.asp""'起始文檔

          DimobjIIS

          'MsgBox""IIS://""&strServerName&""/W3SVC/1""

          OnErrorResumeNext

          SetobjIIS=GetObject(""IIS://""&strServerName&""/W3SVC/1"")

          Iferr=-2147024893Then

          MsgBox""IIS不存在!""&vbcrlf&""請驗證IIS是否已正確安裝!"",vbcritical

          Wscript.Quit

          ElseIferr<>0Then

          MsgBox""未知錯誤!"",vbcritical

          Wscript.Quit

          EndIf

          OnErrorGoTo0

          SetobjVirtualDir=objIIS.GetObject(""IISWebVirtualDir"",""Root"")

          ForeachVRinobjVirtualDir

          IfVR.Name=strVRNameThen

          MsgBox""虛擬目錄""&strVRName&""已存在!"",vbinformation

          Wscript.Quit

          EndIf

          Next

          OnErrorResumeNext

          Setfs=Wscript.CreateObject(""Scripting.FileSystemObject"")

          SetobjFolder=fs.GetFolder(strRootPath)

          Iferr=76Then

          MsgBox""路徑""&strRootPath&""不存在!"",vbcritical

          Wscript.Quit

          EndIf

          SetobjFolder=nothing

          Setfs=nothing

          OnErrorGoTo0

          OnErrorResumeNext

          SetVirDir=objVirtualDir.Create(""IISWebVirtualDir"",strVRName)

          VirDir.AccessRead=true

          VirDir.Path=strRootPath

          VirDir.DefaultDoc=VirDir.DefaultDoc&"",""&strDefaultDoc

          VirDir.setInfo

          Iferr<>0Then

          MsgBox""創建虛擬目錄失敗!"",vbcritical

          Else

          MsgBox""虛擬目錄""&strVRName&""成功創建在服務器""&strServerName&""上!"",vbinformation

          EndIf

          代碼的關鍵在于創建虛擬目錄,及其中的配置:

          SetVirDir=objVirtualDir.Create(""IISWebVirtualDir"",strVRName)

          VirDir.AccessRead=true

          VirDir.Path=strRootPath

          VirDir.DefaultDoc=VirDir.DefaultDoc&"",""&strDefaultDoc

          VirDir.setInfo

        【vbscript自動配置IIS代碼】相關文章:

        IIS詳細錯誤代碼以及解釋08-04

        VBScript的入門學習資料有哪些10-13

        怎么解決外網不能訪問IIS的問題09-29

        過濾HTML代碼08-29

        VBScript中字節數據操作函數06-20

        linux配置dns服務器配置命令09-22

        巧妙的設置IIS7支持ASP07-17

        電腦配置知識10-12

        數控編程代碼大全05-18

        jquery提交按鈕的代碼07-28

        国产高潮无套免费视频_久久九九兔免费精品6_99精品热6080YY久久_国产91久久久久久无码
      3. <sub id="h4knl"><ol id="h4knl"></ol></sub>
        <sup id="h4knl"></sup>
          <sub id="h4knl"></sub>

          <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
          1. <strong id="h4knl"></strong>

          2. 日本嫩草影院久久久精品 | 有亚洲成影院ckck | 亚洲中文字幕在线乱妇 | 中文字幕乱码一区二区免费 | 午夜性999性久久久久 | 色综合国产精品视频 |