eXtreme Development

Windows - pegar serial do computador

1. Using the buid in "wmic" command:

"wmic bios get serialnumber"
Tip: You can use the command "wmic csproduct get name" to retrieve the local computer model.

2. Using a vbs script:

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



SourceForge BootStrap