How to add % in RegValue,

Jun 16, 2015 at 10:52 PM
Try to add
new RegValue(RegistryHive.ClassesRoot,"test\\shell\\open\\command","","\"[INSTALLDIR]test.exe\" \"%1\"")
but % sign cause registry value to be hex value instead of string...
Jun 17, 2015 at 1:14 AM
I just inserted your code into the Registry sample and it seems to work just fine. The value type is an "expandable string":

Jun 17, 2015 at 8:57 AM
When I run the setup and export the registry setting to a reg file, I get :

@=hex(2):22,00,43,.............00,00,00 Compared to what is inserted from previous setup (innosetup):

@="\"C:\Program Files (x86)\test\test.exe\" \"%1\""
Jun 17, 2015 at 12:30 PM
Try to repeat the test I described in my first answer and let me know if you got the same result as mine.
Jun 17, 2015 at 2:17 PM
If I export it to a reg file it still is exported as hex values, but it doesn't seem to matter... it's recognized as path
Jun 18, 2015 at 1:11 AM
I assume that your experiment produced the same result as mine. Meaning that WiX/MSI and Wix# work perfectly. And troubleshooting of the registry exporting is really outside of the Wix# scope.

Though I would even question your interpretation of the exporting result in your test.

Why do you believe that your registry value isn't of a "string" type? The regedit clearly indicates that it is a string. And "hex(2):" in your exported file is a hexadecimal representation of a unicode string.

I am sure if you re-import the exported file it will create again a proper "expandable string" value in the registry. So everything works as expected.