Hard Drive

S

scorpion53061

There is a unique identifying number of each hard drive. There is suppose to
be a way of picking up that number. Does anyone hear remeber how to do that?
 
H

Herfried K. Wagner [MVP]

* "scorpion53061 said:
There is a unique identifying number of each hard drive. There is suppose to
be a way of picking up that number. Does anyone hear remeber how to do that?

AFAIK it's not a unique number, but you can determine the
'VolumeSerialNumber' (a string) using WMI:

Add a reference to "System.Management.dll":

\\\
Dim disk As New ManagementObject( _
"Win32_LogicalDisk.DeviceID=""C:""" _
)
Dim diskProperty As PropertyData
For Each diskProperty In disk.Properties
Console.WriteLine( _
"{0} = {1}", _
diskProperty.Name, _
diskProperty.Value _
)
Next diskProperty
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
 
S

scorpion53061

Thanks herfried........I used to remeber.... :(

Herfried K. Wagner said:
that?

AFAIK it's not a unique number, but you can determine the
'VolumeSerialNumber' (a string) using WMI:

Add a reference to "System.Management.dll":

\\\
Dim disk As New ManagementObject( _
"Win32_LogicalDisk.DeviceID=""C:""" _
)
Dim diskProperty As PropertyData
For Each diskProperty In disk.Properties
Console.WriteLine( _
"{0} = {1}", _
diskProperty.Name, _
diskProperty.Value _
)
Next diskProperty
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top