new ActiveXObject("WbemScripting.SWbemLocator") ????
Locator.ConnectServer(null, "root\\default") ????
Registry.Methods_.Item("EnumValues") ????
etc...
I'm sorry but all this stuff is really not needed at all.
J-Thread is absolutely correct, 'simply' use the available Windows registry API's to do the job. They are all you need (although the method you showed has some "je-ne-sais-qua" too; still I really don't like the detour which activex takes (afterall, it uses those very same apis)).
Speaking of which, I have seen many registry accessing codes, and they are almost always exactly the same (with the same 'mistakes' or limitations), although they 'work', I haven't seen many totally fool proof and correct 100% codes (eg: first checking the length a registry key is, instead of assuming the key wnt be longer than x bytes, before retrieving it)
IIRC, Matty already posted an almost complete (but with some limitations) registry accessing script on the forums...
EDIT: I was wrong(partially) what Matty used was an external DLL =>
ActiveX Registry Access for Scripts