Archive: WriteRegBin max size?


WriteRegBin max size?
Hello. I'm getting a compilation error on the following line:
WriteRegBin HKEY_CURRENT_USER "Software\Company\Product 2.0\Coords" "Data" 4543454604f4e470ffffffccffffffccffffffccffffffccffff...

The actual chunk of binary data is fairly large (12945 characters).
Is there a limit on the size for WriteRegBin??
Not sure why else I would get this error, I have similar entries, but it only fails on the very large one.

Thanks for any thought or advice.


You probably need to use a special build that handles large strings.

The default string size is of 1024 bytes. The special build for large string is capable of handling strings up to 8192 bytes.


Thanks. I tried using the special build for large strings that was on the link you sent me. It solves the large registry problem, but introduces another. Now it won't let me select between two different install features. Only presents one even though two are defined.
Do you think this is a versioning problem? Is the Large string special build too old of a version to incorporate the two install features?
Thanks for your help.


As far as I know, both are compiled/distributed at the same time. Was the NSIS version you were using the same as the special build? If so, I'm not sure what to tell you.

Perhaps someone else might know. (Might also help if you attach an example script to illustrate the problem.)


Hmmmm. well I'm using HM Nsis as a tool to build the script. It appears to use a 2.15 compiler. The LargeString special build is using 2.16. So I wouldn't think that should be a problem. It could be the HM nsis script generation is tailored towards 2.15. Hmmmm there doesn't seem to be much of a difference in the release featues/changes though.
I'll attach a reduced script... if you have time to look it over for anything obvious that would be great. Stripped out all product info and files.


I think I found the problem. I was using the special build large string makensis.exe but I didn't copy over the Stubs folder!! So it was using older versions that came with HM NSIS. Using the correct one is giving the desired results. Thanks a lot for your help Comperio. Really do appreciate it.
May your feasts be filled with the finest Salted Pork and mounds of longbottom leaf.


hmmm...
Your example worked fine for me in both the 'stock' 2.15 and the 'special' 2.16. I'm running out of ideas...

Edit
Seem you and I posted at the same time! Sounds like you found the issue. :cool: