Previous Next

Thread: Log Parser Registry Query

Last post 08-01-2008 7:53 AM by besmart. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 07-29-2008, 6:22 AM

    • bleedow
    • Not Ranked
    • Joined on 07-28-2008, 5:35 AM
    • Posts 5

    Log Parser Registry Query

     Hi again,

    I've managed to get my app working but now I'm having some problems with a simple query.

    part of registry:

    ...
    - VisualStudio
        - Properties
            >ProductName
            >ProductID

    ...

    and I need to obtain this to values, thought that this will do the trick:

     string digitalIDPath = Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").ToString();

    SELECT Value FROM '" + digitalIDPath + "' WHERE (ValueName = 'ProductID' or ValueName='ProductName') AND PATH = (SELECT PATH from '" + digitalIDPath + "' where ValueName LIKE 'ProductID%')

    not working though, any ideas??
     

  • 08-01-2008, 7:53 AM In reply to

    • besmart
    • Not Ranked
    • Joined on 07-25-2008, 12:11 PM
    • Posts 7

    Re: Log Parser Registry Query

     

    bleedow:
    not working though, any ideas??

     string digitalIDPath = Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").ToString(); return the value "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft"

    it must be : HKLM\SOFTWARE\Microsoft

    modify to:

     string digitalIDPath = "HKLM\SOFTWARE\Microsoft"

    i checked your query with a batch , and give me a result ,so , query is a valid

    the batch i do is:

    set digitalIDPath=\HKLM\SOFTWARE\Microsoft
    set q="SELECT value , ValueName FROM %digitalIDPath% WHERE (ValueName = 'ProductID' or ValueName='ProductName') AND PATH = (SELECT PATH from %digitalIDPath%  where ValueName LIKE 'ProductID%')"
    LogParser %q% -i:REG

     

Page 1 of 1 (2 items)
Page view counter