First, what windows are you using? Some registry keys have been renamed, and in some cases you're not allowed to read some keys. E.g. I can't find the EventLog security sources on my Win7-Pro 64 unless I'm using an admisnistrator account.
Also the RegRead from the WScript does not return a path's keys. You'll need to return a specific key. E.g. from the OP's path, in my windows that "folder" contains subfolders as well as keys numbered from 0 through to 149. E.g.
And to save yourself some issue in the future, remember to keep a variable pointing to the object generated by that vlax-create-object function. So you can vlax-release-object later. These ActiveX objects don't get garbage collected like normal lisp variables do, so could end up causing RAM leakage and / or crashes. If you don't keep track of them, there's no way for you to clear them later.
Yep, if at all possible try to stick with HKCU instead. That usually gives the least trouble as most of them are supposed to be user settings and should thus be (at least) readable by the user's security level.
The HKLM is not always unavailable, but chances are that lots of those are set to System security level. Therefore you need admin rights to even see them. And most (if not all) companies disallow admin user rights on their PC's to try stopping viruses and such. If the key is only available in HKLM, then try to use something else to get similar data - e.g. if you want to find the drives connected to the PC, perhaps try the FileSystem object's Drives property: http://msdn.microsoft.com/en-us/library/aa242690%28v=VS.60%29.aspx
Now I'm relieved!!
"Wscript.Shell" and "Scripting.FileSystemObject" are the main event of this thread
Especially to both (Irneb and Lee Mac) of you guys.. Thanks a lot.