提取本地 PC 名称
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSettings = objWMIService.ExecQuery _("Select * from Win32_ComputerSystem")
For Each objComputer in colSettings
wscript.echo objComputer.Name
Next
此代码将回显 PC 的名称,并在其中执行。