Archive: How to copy a REG_BINARY data?


How to copy a REG_BINARY data?
Hi,

I would like to copy registly key/value to a new location.
My value is in REG_BINARY type and there is only
WriteRegBin function no ReadRegBin?

So How can I copy a registly value of type REG_BINARY?

Thanks in advance,
Raj

:rolleyes:


I think NSIS doesn't support this at the moment because it stores the result of the read in a variable which internally is a null terminated string. The binary data could contain a null and so would not be storable in the string.

One way around this could be to use the System plugin. I haven't got time to go into details but be warned that the System plugin is not easy to understand or use due to it's power. Using System for this purpose would require you to know a bit about how C code would be used to call the Windows API function for reading binary registry data.

Hopefully someone else can post an alternative solution for you, or the NSIS code will be modified to include a read reg binary command (this could be done by using strings internally that can contain embedded nulls, e.g. a BSTR, but could potentially be a lot of work)