|
-
Mar 6th, 2011, 03:01 AM
#1
Thread Starter
Lively Member
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
-
Mar 6th, 2011, 10:48 AM
#2
Hyperactive Member
Re: Hard Drive Real Serial Number
What OS's are your friends using?
-
Mar 6th, 2011, 10:23 PM
#3
Thread Starter
Lively Member
Re: Hard Drive Real Serial Number
 Originally Posted by crampz
What OS's are your friends using?
its windows xp
-
Mar 7th, 2011, 01:21 PM
#4
Hyperactive Member
Re: Hard Drive Real Serial Number
 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.
-
Mar 7th, 2011, 08:41 PM
#5
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
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|