Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get Hardware s/n thru VB.NET?
Message
De
16/12/2003 17:40:29
 
 
À
15/12/2003 22:56:20
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00859062
Message ID:
00859701
Vues:
18
For a Windows 98 Machine, you will need to have Windows Management Instrumentation installed. It is not installed on 98, 98SE, or ME by default. This link should give you what you will need to get that information.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;322363

Larry

>Thanks, what I need is to get the manufacture s/n of Hard disk .. FYI I will run this on Win98 or later .. please advise.. I have below codes .. but it only work on XP and Win 2003:
>
>Dim mgmclass As New System.Management.ManagementClass("Win32_PhysicalMedia")
>Dim mgmcoll As Management.ManagementObjectCollection = mgmclass.GetInstances()
>Dim mgmenum As Management.ManagementObjectCollection.ManagementObjectEnumerator = mgmcoll.GetEnumerator
>mgmenum.MoveNext()
>MessageBox.Show(mgmenum.Current.Properties("SerialNumber").Value.ToString)
>
>the above codes will return the one that I can see on the sticker on the hard disk. but it works only XP and 2003
Larry Perry II
MCAD for .NET
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform