Archive: WriteRegBinary


WriteRegBinary
  Hi All--

I have the need to store a calculation in the registry as binary. I've followed the manual, but this doesn't seem to work:


IntOp $0 $var1 * $var3

intFmt$0 "%08X" $0
writeRegBinary HKCU"Software\AllenSoft\Widget" "widgetDefault" $0
>
I get an error saying that the number must be a string in the form of hex. If I replace the variable with an actual number it works.

How do I get around this? A macro expansion will not work as that is at compile time, unless there's something I'm missing.

Use the RegBin plug-in.

http://nsis.sourceforge.net/RegBin_plug-in


Thanks, Kichik as always. Really dumb question here, but why does that limitation exist?


Probably to avoid the parsing in the installer itself for a rare usage case.