Disk Serial Number

S

Soren Hyltoft

Using API: GetVolumeInformation to retrieve harddisk serial number works in
VB6
But in VB.NET it returns 0.
Please tell me how to do it in VB.NET
 
C

Cor Ligthert

Soren,

You mean this?

\\\Set a reference to system.managagemen
Dim disk As New Management.ManagementObject( _
"Win32_LogicalDisk.DeviceID=""C:""")
Dim diskProperty As Management.PropertyData
MessageBox.Show(disk.Properties("VolumeSerialNumber").Value.ToString)
///
I hope this helps a little bit?

Cor
 

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