USB drive manufacturer serial number
USB drive manufacturer serial number
USB drive manufacturer serial number
USB drive manufacturer serial number
USB drive manufacturer serial number
USB drive manufacturer serial number USB drive manufacturer serial number USB drive manufacturer serial number USB drive manufacturer serial number USB drive manufacturer serial number USB drive manufacturer serial number USB drive manufacturer serial number USB drive manufacturer serial number
USB drive manufacturer serial number USB drive manufacturer serial number
USB drive manufacturer serial number
Go Back  Xtreme Visual Basic Talk > > > USB drive manufacturer serial number


Reply
 
Thread Tools Display Modes
  #1  
Old 09-11-2006, 04:16 AM
Nubits's Avatar
Nubits Nubits is offline
Centurion
 
Join Date: Nov 2005
Location: Bulgaria
Posts: 100
Default USB drive manufacturer serial number


Hi,

Is there a way to find the manufacturer serial number of the USB flash? I know some methods, but they give me other serials or just 0000-0000.. not the unique one.

Thanks
Reply With Quote
  #2  
Old 09-11-2006, 06:39 AM
George7a's Avatar
George7a George7a is offline
History: Jesus Is Risen
 
Join Date: Mar 2005
Location: Nazareth
Posts: 1,697
Default

HI,

Quote:
Use Windows Management Instrumentation (WMI) to enumerate the Physical Disks and report the PnP Device IDs. The Vendor and Product ID are part of the PnP Device ID. The PnP Device ID does not have the PCI Vendor and Product ID code (although they look a look alike). One of the cool features of WMI is it's ability to "associate" multiple entries (sorta like an inner join in SQL syntax). Here is a very crude example of how to "walk" the WMI associations to get the Vendor/Product IDs you want.
Code:
dim obj, objs, buf, PnPID ' Get the PnPDevice ID Set objs = GetObject("winmgmts:").InstancesOf("Win32_DiskDrive") for each obj in objs if obj.InterfaceType = "USB" then 'buf = "Model: " & obj.Model & vbcr 'buf = buf & "PnP Device ID: " & obj.PnPDeviceID PnPID = obj.PnPDeviceID 'msgbox(buf) end if next ' fix up the PnPDevice ID to make it suitable for comparing against the Association PnPID = replace(PnPID, "\", "\\") & chr(34) ' Use WMI associations to pair up USBContoller and PnPEntity Set objs = GetObject("winmgmts:").InstancesOf("Win32_USBControllerDevice") for each obj in objs if right(obj.Dependent, len(PnPID)) = PnPID then msgbox(PnPID & vbcr & obj.Dependent & vbcr & obj.Antecedent) end if next
I hope it helps,

- George
__________________
Thabet.Net
Reply With Quote
  #3  
Old 01-01-2017, 01:42 AM
SABJANTA SABJANTA is offline
Newcomer
 
Join Date: Apr 2008
Posts: 1
Default

Quote:
Originally Posted by George7a View Post
HI,



Code:
dim obj, objs, buf, PnPID ' Get the PnPDevice ID Set objs = GetObject("winmgmts:").InstancesOf("Win32_DiskDrive") for each obj in objs if obj.InterfaceType = "USB" then 'buf = "Model: " & obj.Model & vbcr 'buf = buf & "PnP Device ID: " & obj.PnPDeviceID PnPID = obj.PnPDeviceID 'msgbox(buf) end if next ' fix up the PnPDevice ID to make it suitable for comparing against the Association PnPID = replace(PnPID, "", "\") & chr(34) ' Use WMI associations to pair up USBContoller and PnPEntity Set objs = GetObject("winmgmts:").InstancesOf("Win32_USBControllerDevice") for each obj in objs if right(obj.Dependent, len(PnPID)) = PnPID then msgbox(PnPID & vbcr & obj.Dependent & vbcr & obj.Antecedent) end if next
I hope it helps,

- George

Thanks
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
USB drive manufacturer serial number
USB drive manufacturer serial number
USB drive manufacturer serial number USB drive manufacturer serial number
USB drive manufacturer serial number
USB drive manufacturer serial number
USB drive manufacturer serial number USB drive manufacturer serial number USB drive manufacturer serial number USB drive manufacturer serial number USB drive manufacturer serial number USB drive manufacturer serial number USB drive manufacturer serial number
USB drive manufacturer serial number
USB drive manufacturer serial number
 
USB drive manufacturer serial number
USB drive manufacturer serial number
 
-->