There are COM scripts to read from registry, as I mentioned. The $wmiget script works for me, though.