How does one go about this task in VB.NET? I am working on two projects at this point and need to figure out what devices of a set type are installed in the system in each program. One needs to discover all modems and network cards, and the other needs to find all CD/DVD drives and get their mounted letter, such as
. How would I do this? I know there are methods to do so in C++, but these two applications are Win32/Win64 only, so I am using VB.NET fopr fast development.
-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
Comments
: projects at this point and need to figure out what devices of a set
: type are installed in the system in each program. One needs to
: discover all modems and network cards, and the other needs to find
: all CD/DVD drives and get their mounted letter, such as . How
: would I do this? I know there are methods to do so in C++, but these
: two applications are Win32/Win64 only, so I am using VB.NET fopr
: fast development.
: [link=null][/link]
: -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/gre
: en][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h
: [/red][/b][/italic]
After much searching, I have deduced that you will need to use WMI for this. It uses a variation of SQL: WQL
Here are the MSDN links I came accros:
[link=http://msdn2.microsoft.com/en-us/library/ms186146.aspx]WMI Queries[/link]
Then for the classes you can use in the WQL statements look at [link=http://msdn2.microsoft.com/en-us/library/aa389273.aspx]Computer System Hardware Classes[/link].
EDIT: Another (useful?) link: [link=http://msdn2.microsoft.com/en-us/library/ms186146.aspx]WMI .NET implementation[/link]
Accessing the the WMI information goes through the System.Management namespace.
This could get really complicated - but I think I gave you a very nice first step: you now atleast know WHAT to look for - I spent around 45 minutes browsing the .NET framework classes and entering fruitless search queries in the .NET documentation
Best Regards,
Richard
The way I see it... Well, it's all pretty blurry
Is this what you're looking for?
Is this what you're looking for?
Is this what you're looking for?