当前位置:编程学习 > 网站相关 >>

获取主机名(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)

补充:综合编程 , 安全编程 ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,