We got an answer, from third level support. Heres the answer for everyone else to see...
Hello Edward,
I have heard back from the developer who was working on your issue and this is what has been found out:
When a registry key with a name that starts with # is created in the Registry_data in an ism file, it is a File key; i.e. during runtime, the MSI assumes that the key name is a file name and looks for the this file name in the File table and when found creates the key with complete path to the File Name.
In your project, at runtime, MSI tries to find that name in the File
table.. and since no file exits with that name, the error 1406 (unable to create the registry key) is generated.
*** The solution for this is to treat the "#" as a special character and enclose # in square brackets with slash.
For example: To create a key, "#test", then please add the key in the *.ism file and name it in the following format "[\#]test". This will make the # character a part of the name rather than making the registry key a File key.
More information can be found in the MSI help of the Author by searching
under "Formatted."
I believe that this answers your question. Thank you.
Hope this helps someone else..
BadVoodoo