Below is a simple VBScript to determine the current version of MS Access installed on the computer
Dim oRegistry
Dim sKey
Dim sValue
Dim sAppVersion
Const HKEY_CLASSES_ROOT = &H80000000
Set oRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}//./root/default:StdRegProv")
sKey = "Access.Application\CurVer"
oRegistry.GetStringValue HKEY_CLASSES_ROOT, sKey, "", sValue
sAppVersion = Right(sValue, Len(sValue) - InStrRev(sValue, "."))
MsgBox sAppVersion & ""
Set oRegistry = Nothing
Simply save the above in a text file and name it as you please with the extension vbs, close and save. Then double click on it and it should return a message box with the version number of your Access currently configured MS Access installation.
This script gives an error.
Line 2, Char 5
Error: Name redefined
Code: 800A0411
I tried running on Win7 PC, with Ofice 2010 and Office 2013 installed.
There’s a duplicate declaration like the error specifies. Simply delete line 1 or 2 (since they are identical) and it works fine.
I’ve update the code in my post. Thank you for reporting the issue.
It Runs very well.