如何获得序列号 [英] how to get serial no
本文介绍了如何获得序列号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
On Error Resume Next
Dim strComputer
strComputer = InputBox("输入计算机的名称:")
设置objWMIService = GetObject(" winmgmts:"&" {impersonationLevel = impersonate}!\\"& strComputer&" \root \ cimv2")
设置colSMBIOS = objWMIService.ExecQuery ("从Win32_SystemEnclosure中选择*")
对于colSMBIOS中的每个objSMBIOS
MsgBox strComputer& ":" &安培; objSMBIOS.SerialNumber
下一步
应对VB脚本进行哪些更改,以便根据主机名为网络中的所有系统提供序列号?
解决方案
您需要将您的问题发布到The Official Scripting Guys Forum!此论坛主要用于Visual Basic .NET。
http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
On Error Resume Next Dim strComputer strComputer = InputBox("Enter the name of the computer:") Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colSMBIOS = objWMIService.ExecQuery ("Select * from Win32_SystemEnclosure") For Each objSMBIOS in colSMBIOS MsgBox strComputer & ": " & objSMBIOS.SerialNumber Next
What changes should be done for the VB Script so that it should provide the serial no for all System in network based on host name ?
解决方案
You need to post your question to the The Official Scripting Guys Forum!. This forum is primarily for Visual Basic .NET.
http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
这篇关于如何获得序列号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文