HTML5學習總結-番外01 VBScript知識

來源:互聯網
上載者:User

標籤:

1  VBScript 

  VBScript是Visual Basic Script的簡稱,即 Visual Basic 指令碼語言,有時也被縮寫為VBS。它是一種微軟環境下的輕量級的解釋型語言,它使用COM組件、WMI、WSH、ADSI訪問系統中的元素,對系統進行管理。同時它又是asp動態網頁預設的程式設計語言,配合asp內建對象和ADO對象,使用者很快就能掌握訪問資料庫的asp動態網頁開發技術。

2 實驗

1)彈出Wiindows視窗

  建立一個檔案 test1.vbs,

MsgBox "hello"

  在控制台通過命令調用vbs指令碼

call test1.vbs

2)列印電腦位元(32位,64位)

建立一個檔案 test2.vbs,

MsgBox "computer Type=" + GetComputerTypeFunction GetComputerType()    On Error Resume Next    strComputer = "."    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")    Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)    Dim result        For Each objItem in colItems        If InStr(objItem.SystemType, "86") <> 0 Then            result = "x86"                  ElseIf InStr(objItem.SystemType, "64") <> 0 Then            result = "x64"                    Else            result = objItem.SystemType                  End If    Next        GetComputerType = resultEnd Function

  在控制台通過命令調用vbs指令碼

call test1.vbs

 

HTML5學習總結-番外01 VBScript知識

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.