Page 1 of 1
Check Registry problem
Posted: Tue Mar 17, 2009 10:46 pm
by drewau
Hi,
I cannot seem to find a solution to a simple problem I have:
When I try to use Check Registry to read the multi string value from
HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\InstalledInstances
The value returned is UNKNOWN$TYPE. I have searched but can't seem to find a solution to this.
I would like to use this list to populate a combo in my installer.
Here is the IA code:
Code: Select all
~InstallAware Clipboard Data~
~Check Registry~
~{8D6FAF89-EDB1-4DF5-9EFA-431683BF4225}~
~INSTALLEDINSTANCES~
~2~
~Software\\Microsoft\\Microsoft SQL Server~
~InstalledInstances~
I'm using IA Studio 8.
Thanks in advance,
Drew.
Posted: Wed Mar 18, 2009 4:43 am
by bokkie
Drew,
I can certainly replicate the problem you are having. The only thing I can say for certain, is that if I create a new key value as type REG_SZ then it'll accept anything I put into it but if I create it as REG_MULTI_SZ I get the same error as you. That makes me wonder then if you can't actually read such a key type in IA?
EDIT: I think, only think, that you might be able to utilise the Call DLL Function statement and drill into the advap32.dll. You might be able to call the RegOpenKeyEx and RegQueryValueValueEx functions to get the REG_MULTI_SZ value. Just an idea...
Posted: Wed Mar 18, 2009 8:01 am
by MichaelNesmith
This is unfortunately not available in the current version, we're adding this for the next version (returning a $NEWLINE$ delimited list).
Posted: Wed Mar 18, 2009 3:31 pm
by drewau
Thanks for the replies Michael and Bokkie.
I think I'll write a small Delphi plug in to do it.
Posted: Wed Mar 18, 2009 5:21 pm
by bokkie
Drew,
Will that be an IA plug-in? If so, would you be ok to share the source code for it? The reason I ask is that I'm no C++ developer. I did last use Delphi back in the early 1990's when it was version 2.0 but I'm more at ease with Pascal than C++.
I'd like to try and find a working Delphi plug-in sample that I could use as a template for some plug-ins I have in mind.
Posted: Wed Mar 18, 2009 5:33 pm
by drewau
Sure mate,
I'll pop you through some source when I've done it.
Just send me a PM with your email address.
Cheers,
Drew
Posted: Thu Mar 19, 2009 2:45 am
by bokkie
drewau wrote:Sure mate,
I'll pop you through some source when I've done it.
Just send me a PM with your email address.
Cheers,
Drew
Drew, I'm not sure if my PM got through as I got no confirmation from the forum software that it was successfully sent to you. It might but I'll let you confirm.
Posted: Thu Mar 19, 2009 3:56 pm
by drewau
It didn't
I've tried to send you one.