Hard Drive Real Serial Number
PHP Code:
Dim searcher As ManagementObjectSearcher = New ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMedia")
For Each wmi_HD As ManagementObject In searcher.Get()
MessageBox.Show(wmi_HD("SerialNumber"))
Next
iam using this code for getting hard drive serial number its works ok with me but not working on my friends system and return an empty string any help plz
Re: Hard Drive Real Serial Number
What OS's are your friends using?
Re: Hard Drive Real Serial Number
Quote:
Originally Posted by
crampz
What OS's are your friends using?
its windows xp
Re: Hard Drive Real Serial Number
Quote:
Originally Posted by
hackerspk
its windows xp
Its just that, i was reading other threads and wmi function doesn't work under XP or doesnt work well. I can't seem to find the threads now, but im pretty sure.
Re: Hard Drive Real Serial Number
There is no problem on Win32_Physical media i'm aware of.
The problem is on Win32_DiskDrive.serialnumber that needs Vista and above
Here is a thread that i provide both API and WMI and there is also code for Win32_PhysicalMedia.Since i have xp and vs 2003 here i tested to be sure and everything works except Win32_DiskDrive. If you need to go with XP also then you must settle for a unique but not the exact serial number or API for a unique number.
http://www.vbforums.com/showthread.php?t=606257