Page 1 of 1

Registry "The string binding is invalid"

Posted: Tue Aug 30, 2011 6:04 am
by NickDay
Hi,
When I make a registry entry
Write Registry Key HKCR\The name of my application\,

I get an error:

Error
The string binding is invalid
HKEY_CLASSES_ROOT\The name of my applicationWould you like to try again?

The name of my application has spaces in it.
The type of the entry is Integer
The Value and Data fields are false.

There is a thread about this error, but the solution in that case was a complete reinstall of InstallAware.

I notice I don't get the error if I the type of the entry I am creating is String.
[Previously, there was such an entry of type String, created by another installer and which had been deleted.]

This is not directly a problem to me but I thought it worth reporting as maybe a bug in InstallAware 11?

Re: Registry "The string binding is invalid"

Posted: Tue Aug 30, 2011 6:37 pm
by giaviv
Thank you Nick.

It does seem like a reinstall will solve it. What happens when you write to a HKCR value and your software does not contain spaces?

Re: Registry "The string binding is invalid"

Posted: Fri Sep 09, 2011 7:25 am
by NickDay
For what it's worth, I tried it using a name without spaces. No error was reported.
I retried it using the original name with spaces; and this time there was no error reported.
I think originally the registry must have been in a different state.
Nick

Re: Registry "The string binding is invalid"

Posted: Fri Sep 09, 2011 8:45 am
by giaviv
Thanks for your input Nick!

Re: Registry "The string binding is invalid"

Posted: Fri Sep 09, 2011 11:04 am
by NickDay
Re-reading my earlier posts reminded me that it was an integer, not a string I was trying to create. So I tried again:

I experimentally introduced two new lines into my installer:
Write Registry Key HKCR\<a name containing spaces>\,
Write Registry Key HKCR\<a name with no spaces>\NO$VALUE,

In both cases, the Data field was empty, and the type selected was '(.) Integer'. [] Permanent was unchecked.
Both these lines cause the installer to throw an error, "The string binding is invalid". My guess is you could reproduce this easily if you wish to.
From earlier tests, I believe that if (.) String had been selected, it would not have errored.

Nick

Re: Registry "The string binding is invalid"

Posted: Sat Sep 10, 2011 7:56 am
by giaviv
Thanks Nick!