Very cool - this helped me remotely get information on a dead monitor and check the warranty status on it without seeing the monitor in person, or digging behind it and moving stuff just to get the serial number- very simple and works great - thanks! Very cool - this helped me remotely get information on a dead monitor and check the warranty status on it without seeing the monitor in person, or digging behind it and moving stuff just to get the serial number- very simple and works great - thanks!
VBS - How to get HD serial numberVBS - How to get HD serial number
Hi there, Here is my vbs code to read HD serial number. The WMI return only a unintelligible byte value. So I've written a conversion function. ---------------------------------------- strComputer = '.' Set objWMIService = GetObject('winmgmts:{impersonationLevel=impersonate}!' & strComputer & 'rootcimv2') str = ' Set colItems = objWMIService.ExecQuery('SELECT * FROM Win32_PhysicalMedia') For Each objItem In colItems str = objItem.SerialNumber & vbCrlf & vbCrlf msgbox( 'Serial Number : ' & ConvertSN(Str)) next Function ConvertSN(Str) DIM Hxstr DIM i Hxstr = ' for i=0 to (Len(str)/4)-2 Hxstr = Hxstr & chr('&H' & mid(str,4*i+3,2)) & chr('&H' & mid(str,4*i+1,2)) next Hxstr = trim(Hxstr) ConvertSN = Hxstr end function ------------------------------------------ Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |