Archive: Remove dead space from reg_multi_sz


Remove dead space from reg_multi_sz
I am using the registry plug-in and am trying to remove a single string from the value of the key. I can accomplish this with the following lines:

${registry::ReadExtra} "HKLM\System\CurrentControlSet\Services\Eventlog\System" "Sources" "" $R1 $R2
${WordReplace} $R1 "prot_srv" "" "+" $R1
${registry::Write} "HKLM\System\CurrentControlSet\Services\Eventlog\System" "Sources" "$R1" "$R2" $R3


Unfortunatly, this leave a dead space or carriage return within the key and it no longer registers anything beyond the dead space. If I physcially open the key with regedit and close it, the registry will fix itself.

Does anyone know of a way to eliminate, not only the string but the line or space itself?


${WordReplace} $R1 "prot_srv$\n" "" "+" $R1

lol, I swear I tried that.

Thank you very much.