复制代码 代码如下:
strComputer = "."
Set objCmdLib = CreateObject("Microsoft.CmdLib")
Set objCmdLib.ScriptingHost = WScript.Application
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
WScript.Echo objCmdLib.getHostName(objWMIService)
strComputer = "."
Set objCmdLib = CreateObject("Microsoft.CmdLib")
Set objCmdLib.ScriptingHost = WScript.Application
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
WScript.Echo objCmdLib.getHostName(objWMIService)
标签:
主机名
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
内蒙古资源网 Copyright www.nmgbbs.com
暂无“获取主机名的vbs(cmdlib.wsc)”评论...