Hi dear how do to get serial number hard drive and mother bord in vb.net? Thanks Ok here it is Extract the zip, contains. VB Helper: HowTo: Get mother board serial numbers and CPU IDs in Visual. Private Function CpuId() As String Dim computer As String = '.
I'm trying to get the hardware manufacturer (e.g. 'Dell') and the model number (e.g. 'Latitude E6320') using vb.net but I'm having no luck.
I've tried
Though this returns 'Microsoft Corporation' not 'Dell'.
rabbittrabbitt
2 Answers
You are polling the wrong WMI class/hive. Of course Microsoft is the OS manufacturer; what you need is
Win32_ComputerSystem
:Manufacturer will be something like 'Dell, Inc', Model comes out spot on with mine, but has been known to sometimes include internal sub model identifiers. System type comes back as 'x64-based PC' on mine.
MS has a WMI query builder somewhere to help fnd and use the right query, though it generates very wordy code.
Nat PongjardenlarpNat Pongjardenlarp
Give this a try in a console application. Just remember to add the System.Management reference to your project. You need to access the Win32_ComputerSystem not the Win32_OperatingSystem.
Hope it helps.
DataCryptDataCrypt
Not the answer you're looking for? Browse other questions tagged vb.netsystem-information or ask your own question.
Is it possible to read the serial number of a USB drive using VB.
Lingesh
3 Answers
this will give you the info on your drives in .net, including usb devicesJust import these
Imports ScriptingImports System.IO
MaddMarkMaddMark
Google found these tutorials:
visual basic (for hdd serial, but it seems it works for a usb drive too):
powershell and vbasic:
vbasic:
Mercer TraiesteMercer Traieste
It's in the registry,
HKLMSystemCCSEnumUSBVID_XXXX&PID_YYYY<serial>
.(Vendor and Product ID will vary too, as serial numbers are only unique for a single product.)MSaltersMSalters