The issue isn't to recognize the PROCESSOR_ARCHITECTURE - that i did in previous function in my full code and set $SERVER_PLATFORM accordingly - the issue/question is how can I control the reading of the Registry key in x64 machine:
from: HKEY_LOCAL_MACHINE\SOFTWARE
or: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node