How To Get the Hardware Serial Number 
Author Message
 How To Get the Hardware Serial Number

Hi there,

I'm looking for a VB code (VB5 or 6) to get the hardware serial number from
the motherboard or hard disk. Does anyone nows how?

Please post reply here.

Yours sincere.

Nelio.



Wed, 17 Aug 2011 06:39:15 GMT  
 How To Get the Hardware Serial Number


Quote:
> Hi there,

> I'm looking for a VB code (VB5 or 6) to get the hardware serial number
> from the motherboard or hard disk. Does anyone nows how?

> Please post reply here.

Someone else may post an API solution, but you can use WMI. The following
are VBScript links, but similar works great in VB. For the BIOS s/n see this
link:

http://www.microsoft.com/technet/scriptcenter/scripts/hardware/basic/...

For the motherboard s/n:

http://www.microsoft.com/technet/scriptcenter/scripts/hardware/basic/...

For a volume s/n:

http://www.microsoft.com/technet/scriptcenter/scripts/storage/disks/d...

For s/n of logical disk:

http://www.microsoft.com/technet/scriptcenter/scripts/storage/disks/d...

and for drive s/n using the FileSystemObject:

http://www.microsoft.com/technet/scriptcenter/scripts/storage/disks/d...

The queries in the links above generally retrieve all drives or volumes, but
you can add a WHERE clause to restrict the results to one volume or drive.
For example, something similar to:

        Set colDisks = objRemote.ExecQuery _
            ("SELECT * FROM Win32_LogicalDisk WHERE Name = 'C:'")

I hope this helps.
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--



Wed, 17 Aug 2011 10:33:51 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Obtaining Hardware Serial Number

2. Hardware serial numbers

3. Hardware Serial Number

4. CPU/Hardware Serial Number

5. Retrieve Hardware Serial Number

6. Retrive Hardware Serial Number???

7. abtaining hardware serial number programmically?

8. Network card serial number or Bios Serial Number

9. Getting harddisk serial number in VB.NET

10. Getting Hard Drive Serial number

11. HELP-VB5: getting CD SERIAL NUMBER or unique

12. Getting drive serial number in Win16

 

 
Powered by phpBB® Forum Software