For your specific problem:
$RC=setoption("WOW64AlternateRegView","On")

You'll probably need this one to eventually.
$RC=setoption("Wow64FileRedirection","on")