Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Registering SRPControls
When registering the srpcontrols, what is it that determines where in the registry it ends up?
An alternate question is how can I programmatically find the currently registered version of the control?
I utilised the srp_Registry function to determine the location of the currently registered control and it appeared to work fine until I ran the same process on another machine and it returned null. That was because the control wasn't in the part of the registry I was expecting and had coded for.
So whilst I was looking in 'HKCU\Software\SRP', for this particular user, a control 'F' located it in 'HKCR\CLSID\'
Not sure how I am meant to find it there.
Any suggestions?
An alternate question is how can I programmatically find the currently registered version of the control?
I utilised the srp_Registry function to determine the location of the currently registered control and it appeared to work fine until I ran the same process on another machine and it returned null. That was because the control wasn't in the part of the registry I was expecting and had coded for.
So whilst I was looking in 'HKCU\Software\SRP', for this particular user, a control 'F' located it in 'HKCR\CLSID\'
Not sure how I am meant to find it there.
Any suggestions?
Comments
The short answer to your first question is that Microsoft determines where it wants to store registration information. I don't know the specific rules although I know 32bit versus 64bit machines will handle this differently.
For your second question, does this thread help?
Yes and No.
I found that today, so I used it and then concatenated the registered path so if the version came back different from different machines, I could better understand why.
As it turned out, the version was the same but the paths were different because the registry locations were different. So basically I got the reverse outcome of what I was attempting to achieve.
Perhaps I just forgot to click 'Submit' :-/
I neglected to mention that the first path you provided, HKCU\Software\SRP, is what we create ourselves. This was done sometime ago as a courtesy but it is not required, is not definitive, and does not get used to enable the control to work. As I mentioned before, this is all handled by Microsoft (Windows) when you run RegSvr32.exe.
HKCR\CLSID should be the way to go.
How do I do a 'Ctrl F' of the registry?
Kevin will probably have to come in and save the day with an answer. The best I can guess is this:
and what you've said above is certainly applicable for my local machine.
I'll try some variations in time but I'm liking what I'm seeing.
A couple things to note. First, the CLSID for a control never changes. So, once you find it, you could just skip the step that looks up the ProgID. For example, the SRP Button info can always be found at:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{200EC299-E8F5-41A0-8F12-D535168FBFC1}
Second, Windows will translate the above registry path behind the scenes on 64 bit systems. So, even though you specify "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\", it will get translated to "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\".I like it when little mysteries are revealed.
I'm picturing a whole new 'About' page.