Saturday, September 29, 2007

VBScript - To get service tag of your desktop

Usage: Script.vbs computer1 computer2 computer3

'Script start

For i = 0 to wscript.arguments.count-1
sComputer = wscript.arguments(i)
Set oWMI = GetObject("winmgmts:\\" & sComputer & "\root\cimv2")
Set oCol = oWMI.ExecQuery("Select * from Win32_ComputerSystemProduct")
For Each x in oCol
wscript.echo sComputer & vbtab & x.IdentifyingNumber

'Script End

content from

Queries on customization. Open and post it .

No comments: