Page 1 of 1

Check Registry does not seem to work with space in key name

Posted: Fri Feb 10, 2012 12:14 pm
by carlos
Hello,

I am having a problem with Check Registry. I want to check for the existence of a key in the location HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and put the result into a variable. I am leaving the Value field in the Check Registry dialog empty so that if the key exists I should be receiving the default value which is NO$VALUE. I created a quick test installer that I can run repeatedly, with it I have been able to confirm that if the key I test for has no spaces, it returns the expected NO$VALUE, but if the key has spaces it returns NO$KEY. Therefore I must be having problems defining keys with spaces.

This returns NO$KEY even if the key is there:

~InstallAware Clipboard Data~
~Check Registry~
~{82770485-A981-401D-B2CB-5D1CE9B0E837}~
~BIOPDFWRITERINSTALLED~
~2~
~SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PDF Writer - bioPDF_is1~
~~

This returns NO$VALUE which is what I would expect.

~InstallAware Clipboard Data~
~Check Registry~
~{82770485-A981-401D-B2CB-5D1CE9B0E837}~
~BIOPDFWRITERINSTALLED~
~2~
~SOFTWARE\Microsoft\Windows\CurrentVersion\WIC~
~~

I have tried testing for some of the keys in that Uninstall location such as Microsoft SQL Server 10 and they return NO$KEY, when the expected value should be NO$VALUE.

How do I deal with spaces in the key name? or what am I doing wrong?

Thanks

Carlos

Re: Check Registry does not seem to work with space in key n

Posted: Thu Feb 23, 2012 6:23 am
by alibaba
Did you try quoting (" ") the string?