M
Mota
Hi;
I want to get serial no. of a system H.D.D .I used this WMI script on win xp
but it doesnt work.AFAIR wmi is installed on Win XP by default but dont know
what i have to replace in this code ,or what other is wrong:
' Code from MSDN library
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
Wscript.Echo "Part Number: " & objSMBIOS.PartNumber
Wscript.Echo "Serial Number: " _
& objSMBIOS.SerialNumber
Wscript.Echo "Asset Tag: " _
& objSMBIOS.SMBIOSAssetTag
Next
Can u help me?
Thank you in advance.
I want to get serial no. of a system H.D.D .I used this WMI script on win xp
but it doesnt work.AFAIR wmi is installed on Win XP by default but dont know
what i have to replace in this code ,or what other is wrong:
' Code from MSDN library
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
Wscript.Echo "Part Number: " & objSMBIOS.PartNumber
Wscript.Echo "Serial Number: " _
& objSMBIOS.SerialNumber
Wscript.Echo "Asset Tag: " _
& objSMBIOS.SMBIOSAssetTag
Next
Can u help me?
Thank you in advance.