Add this to your code...

 Code:
$RC=setoption("WOW64AlternateRegView","On")


Most likely you are using Win 7 64bit. Kix32 is a 32bit exe and without turning on the option, will only see the 32bit portion of the registry.