Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting the serial number of the drive
Message
 
À
20/09/2010 11:07:10
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01481909
Message ID:
01482008
Vues:
44
>>Hex ---- decimal
>>Apply HEX(loDrive.SerialNumber) to see the very same number as in GetDriveInformation
>
>Ok, that is what I thought. But, in that version of the code, I was mixing a volume serial number with a drive serial number. So, they had to be different. But, I have adjusted my class and when verifying the same thing, as you said, a conversion would give me the same thing.

If I understand you correctly, you want to get hard drive serial number, not volume serial number. But both methods that you are using, they return volume serial number. Probably you need to use Win32_PhysicalMedia objects instead of Win32_LogicalDisk.

This may help:
http://www.codeproject.com/KB/cs/hard_disk_serialno.aspx
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform