Hello all, I am looking to get device names and IDs from the registry but so far I have been unable to do so. I found another similar question/response that showed how to search the registry through using log parser 2.2 as a COM library.
I modified only the query and where it plops the text out to from the original code -
RegRecordSet rs = null;
-
try
-
{
-
LogQuery qry = new LogQuery();
-
RegistryInputFormat registryFormat = new RegistryInputFormat();
-
string query = @"SELECT ValueName, Value from \HKLM\SYSTEM\ControlSet001\Control\Class WHERE Value LIKE 'PCI\\VEN_%'";
-
rs = qry.Execute(query, registryFormat);
-
for (; !rs.atEnd(); rs.moveNext())
-
txt1.AppendText(rs.getRecord().toNativeString(" , ") + System.Environment.NewLine);
-
}
-
finally
-
{
-
rs.close();
-
}
-
I get output like this -
MatchingDeviceId , pci\ven_8086&dev_3a3a
-
MatchingDeviceId , pci\ven_8086&dev_3a3c
-
MatchingDeviceId , pci\ven_8086&dev_3a34
-
MatchingDeviceId , pci\ven_8086&dev_3a35
-
MatchingDeviceId , pci\ven_8086&dev_3a36
-
MatchingDeviceId , pci\ven_8086&dev_3a37
-
MatchingDeviceId , pci\ven_8086&dev_3a38
-
MatchingDeviceId , pci\ven_8086&dev_3a39
-
MatchingDeviceId , pci\ven_1002&dev_9442
-
MatchingDeviceId , pci\ven_1002&dev_68f9
-
DeviceInstanceID , PCI\VEN_8086&DEV_10CD&SUBSYS_01981025&REV_00\3&11583659&0&C8
-
ComponentId , pci\ven_8086&dev_10cd
-
MatchingDeviceId , pci\ven_8086&dev_10cd
-
MatchingDeviceId , pci\ven_8086&dev_3423
-
MatchingDeviceId , pci\ven_8086&dev_3a30
-
MatchingDeviceId , pci\ven_8086&dev_3425
-
MatchingDeviceId , pci\ven_8086&dev_244e
-
MatchingDeviceId , pci\ven_8086&dev_3426
-
MatchingDeviceId , pci\ven_8086&dev_3405
-
MatchingDeviceId , pci\ven_8086&dev_342d
-
MatchingDeviceId , pci\ven_8086&dev_3408
-
MatchingDeviceId , pci\ven_8086&dev_342e
-
MatchingDeviceId , pci\ven_8086&dev_340a
-
MatchingDeviceId , pci\ven_8086&dev_3438
-
MatchingDeviceId , pci\ven_8086&dev_340e
-
MatchingDeviceId , pci\ven_8086&dev_3a16
-
MatchingDeviceId , pci\ven_8086&dev_3422
-
MatchingDeviceId , pci\ven_1106&dev_3044
-
which is half the puzzle... what I would like to do is pull the DriverDesc field as well (or any other field for that matter) but it doesnt seem to let you based off of the way it makes it's "sql fields"
**From the Log parser 2.2 help file**
Thanks for any help/suggestions!
0 1159 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Sue |
last post by:
Anyone have any ideas on why the code below will show up
in a browser's sourcecode as an empty table, and is not
visible?
aspx:
<headertemplate>
<asp:Table ID="MyTable" runat="server" />
...
|
by: Andrew |
last post by:
I spent tons of time searching the web for how to use .NET 2.0 and C# to
modify Registry key security. After finally finding an example, and once I
knew the function names a few other small...
|
by: Slimo |
last post by:
Hello,
I'm searching some example of code (VB) for reading remote registry subkeys
and keys.
Thanks
|
by: Matt Brandes |
last post by:
I am looking for a solution that would allow me to recursively backup a
given registry key that I could then use to import into another machine.
The problem that I keep having is the inability to...
|
by: academic |
last post by:
Does anyone know where in the registry the following goes?
WriteProfileString("windows", "Device", DeviceLine)
Or where this comes from?
GetProfileString("PrinterPorts", vbNullString, "",...
|
by: Austin Myers |
last post by:
I don't think I can do what I wanted initially, setting a registry keys
permissions via code and grant user permission. So, can anyone tell me, is
there a place in the registry where people...
|
by: Bill Nguyen |
last post by:
I ran into Excel alphanumeric data column import using ADO.NEt.
Upon searching, I found this solution, but it requires edit a registry entry
as follow:...
|
by: Newbie Coder |
last post by:
Hello Newsgroup Readers
I would like to know how to go & do the following:
I have a certain registry key that has sub values
Example:
Key1 http://www.microsoft.com
Key2 ...
|
by: David Mathog |
last post by:
We've established that a line of code like:
(void) function( (long *) &(something) );
may (and probably should) generate one of these
warning: dereferencing type-punned pointer will break...
|
by: =?Utf-8?B?U3RldmUgQmVobWFu?= |
last post by:
I have a single integer that I wish to save from execution to execution of a
simple application.
Is there a way to save this persistent data in a registry key from a Visual
C++ program?
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |