获取主机名(cmdlib.wsc)
vbs小铺
strComputer = "."
Set objCmdLib = CreateObject("Microsoft.CmdLib")
Set objCmdLib.ScriptingHost = WScript.Application
Set objWMIService = GetObject("winmgmts:\" & strComputer & "ootcimv2")
WScript.Echo objCmdLib.getHostName(objWMIService)
补充:综合编程 , 安全编程 ,