1 VBScript
VBScript is the short name for Visual Basic script, the Visual Basic scripting language, and sometimes abbreviated as VBS. It is a lightweight, interpreted language in a Microsoft environment that uses COM components, WMI, WSH, and ADSI to access the elements in the system to manage the system. At the same time, it is the ASP Dynamic Web page default programming language, with ASP built-in object and ADO object, the user can quickly grasp the ASP Dynamic Web page development technology that accesses the database.
2 experiments
1) Pop-up Wiindows window
Create a new file Test1.vbs,
" Hello "
To invoke the VBS script from the console by command
Call Test1.vbs
2) Number of printed computer positions (32-bit, 64-bit)
Create a new file 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",, -) Dim result for each objiteminchcolitems If InStr (Objitem.systemtype," the") <>0Then result="x86"ElseIf InStr (Objitem.systemtype," -") <>0Then result="x64"Else Result=objitem.systemtype End If Next getcomputertype=resultend Function
To invoke the VBS script from the console by command
Call Test1.vbs
HTML5 Learning Summary-pan-out VBScript knowledge