Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Help with vbs script

Reply
 
Old 07-03-2009   #11 (permalink)
Mark D. MacLachlan


 
 

Re: Help with vbs script

For the purpose of the academic discussion, mayayana I tested both of
your suggestions. Neither works in this case. I beleive your code to
be fully sound, the problem appears to be within Windows 7 not allowing
access to these keys.

My System SpecsSystem Spec
Old 07-03-2009   #12 (permalink)
mayayana


 
 

Re: Help with vbs script

Quote:

> For the purpose of the academic discussion, mayayana I tested both of
> your suggestions. Neither works in this case. I beleive your code to
> be fully sound, the problem appears to be within Windows 7 not allowing
> access to these keys.
I just tried it and both worked fine on Win7,
but actually I'm not surprised. I installed the
32-bit version. So the problem is probably with
the 64-bit Registry rather than with any permission
issues. Which might also explain what you're
seeing. If it were a permissions problem you should
be able to read all of HKLM, I think, but write to
none of it. But with a 64-bit problem you might
very well have the parent key present without the
child key you're looking for, or vice versa, even though
that result appears wrong.

The Win64 Registry is a very funky thing. As I
understand it, there are really two Registries, for all
practical purposes. The 64-bit Registry is seen by
64-bit processes, while any 32-bit program gets silently
dumped into the new "Wow6432Node" key, which is
essentially the 32-bit Registry. So there can be both
32-bit and 64-bit programs running, and they're
both actually accessing a different Registry! (One
Registry tree in structure, but two Registries in
practice.)

With the API there seems to be a way for 32-bit
software to override that problem. There's some info.
here:
http://msdn.microsoft.com/en-us/libr...29(VS.85).aspx

Also, there's apparently a way using WMI to switch
between 32-bit and 64-bit Registries, if desired. I
don't have anything 64-bit to try it on, but it looks
like it may be feasible to write a WMI test, running
in a 32-bit process, that checks the keys of both
Registries.... though it looks like a clunky solution:

http://msdn.microsoft.com/en-us/libr...67(VS.85).aspx

It's unfortunate that MS hasn't updated WScript.Shell
for the 64-bit Registry, but word is that while WSH will be
supported for the life of Win7, at least, no further updates
are planned.


My System SpecsSystem Spec
Old 07-03-2009   #13 (permalink)
Mark D. MacLachlan


 
 

Re: Help with vbs script

Regretfully neither link seems to resolve the issue of reading these
keys on Windows 7 x64, however I don't want to hijack the OPs thread.
I'll continue to investigate and share results when I've made progress.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Logon Script Causing Laptops To Hang - Problems in script? VB Script
problem passing args to script 'There is no script engine for file extenstion' VB Script
Include another script, keep variables in included script? PowerShell
Script file has 'OS Handle' error when run from script PowerShell
Can you drag-n-drop a file on top of a PS script to run the script? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46