What is the source of the long string? Where are you copying it from?

I've just cut'n'pasted the string into a script with no problems at all.

As Les says, the field is REG_MULTI_SZ, not binary. A registry export may present it as a hex string, but there is no binary data.

(My) string is about 31kb, which is close to the string limit so you may need to chop it into smaller parts and catenate them. You will also need to remember to double up the "%" characters.

I won't post the string here as it is so large, but I can mail the file to you if you wish.