|
-
Sep 20th, 2016, 05:57 AM
#1
Thread Starter
Lively Member
How to Get System Serial Number?
This is my code but, MsgBox does not appear !
= *** even on label I can't see it {Label1.caption = strComputer & ": " & objSMBIOS.SerialNumber} )

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
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|