+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Registry Search with Wildcard?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2013
    Location
    Devon, United Kingdom
    Posts
    27

    Post Registry Search with Wildcard?

    My DLL should be installed in a sub-directory of third-party vendor's folder. There may be several versions of vendor's product installed, and I need to find the most recent.
    Until recently, I could search the Registry for key Vendor.Product.Application. Having found that I could get the product class ID and from there obtain more information.
    Unfortunately, the rules seem to have changed. That registry key now looks like Vendor.Product.Application.{class id}. In other words, you need to know the class ID in order to construct the search string to find ... the class ID!
    A search string like Vendor.Product.Application.* doesn't work. Is there a way to search the Registry using a wildcard?

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Registry Search with Wildcard?

    Hello,

    As I understand it, you would like to "loop" through Registry subkeys. Just use "Get Registry SubKey..." to handle this. You can use "Handle String Operation..." to retrieve the {class id} part.

    Does this help?

    Friedrich
    Attached Images Attached Images  

  3. #3
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Registry Search with Wildcard?

    BTW, if you can post a registry example then I can help to write the code.

    Friedrich

  4. #4
    Join Date
    Nov 2013
    Location
    Devon, United Kingdom
    Posts
    27

    Default Registry Search with Wildcard?

    Quote Originally Posted by linder View Post
    BTW, if you can post a registry example then I can help to write the code.

    Friedrich
    Thanks! Here's a screenshot showing two Bentley.MicroStation.Application.{class ID} keys.


  5. #5
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Registry Search with Wildcard?

    No problem. I'll post a project later today.

    Friedrich

  6. #6
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Registry Search with Wildcard?

    Hello,

    I have developed and uploaded a registry scan project for you. It's a processor-intensive task, but doable:

    http://www.lindersoft.com/projects/ScanRegistry.zip

    Friedrich
    Attached Images Attached Images    

  7. #7
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Registry Search with Wildcard?

    Hello,

    During my tests, I noticed that scanning through the Registry with many keys is really slooooow. I've found a bottleneck in the function and have optimized the code. It is way faster now. Down from 3+ minutes (SB V8.1) to 4 seconds (SB 8.2). I can send you a re-compiled test executable if you want.

    Friedrich

  8. #8
    Join Date
    Nov 2013
    Location
    Devon, United Kingdom
    Posts
    27

    Default Registry Search Example

    Thanks for the sample code. I don't think I could have come up with that

  9. #9
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Registry Search Example

    You are welcome

    The next version comes with the optimized code to "fix" the annoying bottleneck in the process.

    Friedrich

  10. #10
    Join Date
    Nov 2013
    Location
    Devon, United Kingdom
    Posts
    27

    Unhappy Re: Registry Search with Wildcard?

    Quote Originally Posted by linder View Post
    Hello,

    I noticed that scanning through the Registry with many keys is really slooooow.
    It uses a lot of memory too! Searching my Registry, with ~7,000 entries in HK CLASSES, I get memory warnings from Windows.

    Also, it reports only the first of two similar keys.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •