I am trying to get LF/CR after each %0d%0a but it appears I have the code incorrect.
Here’s an example:
Current relevance statement
Q:concatenation “%0d%0a” of hexadecimal string (value “AccessProtectionUserRules” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\McAfee\SystemCore\VSCore\On Access Scanner\BehaviourBlocking” of registry as string)
Not that you are asking, but this is not how I would recommend reading this value.
values "AccessProtectionUserRules" of keys "HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\SystemCore\VSCore\On Access Scanner\BehaviourBlocking" of (x64 registries; x32 registries)
This is how I would recommend reading the raw values.
Then this for the final result:
concatenations "%0d%0a" of (hexadecimal strings it) of unique values of (it as string) of values "AccessProtectionUserRules" of keys "HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\SystemCore\VSCore\On Access Scanner\BehaviourBlocking" of (x64 registries; x32 registries)
I’m saying the query part of the statement could be better, but then add in the rest, like this:
concatenations "%0d%0a" of (hexadecimal strings it) of unique values of (it as string) of values "AccessProtectionUserRules" of keys "HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\SystemCore\VSCore\On Access Scanner\BehaviourBlocking" of (x64 registries; x32 registries)
The way your query was written, it wouldn’t work on 32bit systems, and it would have issues in some other cases. You might not have 32bit systems, but even so, I’d still recommend writing it like this.
Also, just want to add that I’m not actually testing this since I don’t have this product installed. I’m just rewriting it the way I think would be best, but I’m doing some guess work here since I can’t test it myself. I’m trying to point out the general form, not the exact details.
I’ll also add that unique values of could be removed depending on your needs, but I generally like to include it even when not needed. It does have the effect of alphabetizing the results, which can be either an advantage or a disadvantage if you need to maintain the order.