473,387 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

searching the registry redux

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

Expand|Select|Wrap|Line Numbers
  1.             RegRecordSet rs = null;
  2.             try
  3.             {
  4.                 LogQuery qry = new LogQuery();
  5.                 RegistryInputFormat registryFormat = new RegistryInputFormat();
  6.                 string query = @"SELECT ValueName, Value from \HKLM\SYSTEM\ControlSet001\Control\Class WHERE Value LIKE 'PCI\\VEN_%'";
  7.                 rs = qry.Execute(query, registryFormat);
  8.                 for (; !rs.atEnd(); rs.moveNext())
  9.                     txt1.AppendText(rs.getRecord().toNativeString(" , ") + System.Environment.NewLine);
  10.             }
  11.             finally
  12.             {
  13.                 rs.close();
  14.             }
  15.  
I get output like this

Expand|Select|Wrap|Line Numbers
  1. MatchingDeviceId , pci\ven_8086&dev_3a3a
  2. MatchingDeviceId , pci\ven_8086&dev_3a3c
  3. MatchingDeviceId , pci\ven_8086&dev_3a34
  4. MatchingDeviceId , pci\ven_8086&dev_3a35
  5. MatchingDeviceId , pci\ven_8086&dev_3a36
  6. MatchingDeviceId , pci\ven_8086&dev_3a37
  7. MatchingDeviceId , pci\ven_8086&dev_3a38
  8. MatchingDeviceId , pci\ven_8086&dev_3a39
  9. MatchingDeviceId , pci\ven_1002&dev_9442
  10. MatchingDeviceId , pci\ven_1002&dev_68f9
  11. DeviceInstanceID , PCI\VEN_8086&DEV_10CD&SUBSYS_01981025&REV_00\3&11583659&0&C8
  12. ComponentId , pci\ven_8086&dev_10cd
  13. MatchingDeviceId , pci\ven_8086&dev_10cd
  14. MatchingDeviceId , pci\ven_8086&dev_3423
  15. MatchingDeviceId , pci\ven_8086&dev_3a30
  16. MatchingDeviceId , pci\ven_8086&dev_3425
  17. MatchingDeviceId , pci\ven_8086&dev_244e
  18. MatchingDeviceId , pci\ven_8086&dev_3426
  19. MatchingDeviceId , pci\ven_8086&dev_3405
  20. MatchingDeviceId , pci\ven_8086&dev_342d
  21. MatchingDeviceId , pci\ven_8086&dev_3408
  22. MatchingDeviceId , pci\ven_8086&dev_342e
  23. MatchingDeviceId , pci\ven_8086&dev_340a
  24. MatchingDeviceId , pci\ven_8086&dev_3438
  25. MatchingDeviceId , pci\ven_8086&dev_340e
  26. MatchingDeviceId , pci\ven_8086&dev_3a16
  27. MatchingDeviceId , pci\ven_8086&dev_3422
  28. MatchingDeviceId , pci\ven_1106&dev_3044
  29.  
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!
Attached Images
File Type: jpg Capture.jpg (85.6 KB, 82 views)
May 5 '11 #1
0 1159

Sign in to post your reply or Sign up for a free account.

Similar topics

1
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" /> ...
2
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...
3
by: Slimo | last post by:
Hello, I'm searching some example of code (VB) for reading remote registry subkeys and keys. Thanks
5
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...
4
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, "",...
7
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...
2
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:...
9
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 ...
1
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...
4
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?
0
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
marktang
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,...
0
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...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.