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?
1 Attachment(s)
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
Re: Registry Search with Wildcard?
BTW, if you can post a registry example then I can help to write the code.
Friedrich
Registry Search with Wildcard?
Quote:
Originally Posted by
linder
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.
http://www.la-solutions.co.uk/images...ry-Example.png
Re: Registry Search with Wildcard?
No problem. I'll post a project later today.
Friedrich
3 Attachment(s)
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
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
Re: Registry Search Example
You are welcome :)
The next version comes with the optimized code to "fix" the annoying bottleneck in the process.
Friedrich
Re: Registry Search with Wildcard?
Quote:
Originally Posted by
linder
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.