I have found a strange effect.

See script snippet below (the registry key is just an example only).


In V5/64 the script works ok.

In V5/32 it seems not possible to read the key.

And yes, the key does exist, proved by using V5/64…


What the heck can this be, and how could I solve it?








Option Explicit


Call Main()

Sub Main()


Dim ws                      'Shell


Dim Something

Dim OK64




Set ws = createobject("Wscript.shell")



'On Error Resume Next


'look For 64bit version

OK64 = False

Something = ws.regread("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E0699DA0-6559-4F4C-8DA2-7C7A83DEB2FB}\InstallDate")

If Err.Number = 0 Then OK64 = True

msgbox "OK64 = " & OK64 & vblf & "Error = " & Err.Number & vblf & Something





End Sub

Views: 240

Replies to This Discussion

Hi Charles,

On 64-bit Windows, portions of the registry entries are stored separately for 32-bit application and 64-bit applications and mapped into separate logical registry views using the registry redirector and registry reflection, because the 64-bit version of an application may use different registry keys and values than the 32-bit version. There are also shared registry keys that are not redirected or reflected.

 -- Dale

Hi Dale,




I did some research.

The conclusion is, it is not possible with VBScript to get some HKLM keys when Rhino32 runs on a 64bit OS.


Not a big deal, but good to know for future attempts.







© 2018   Created by McNeel Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service