Hi, Bruce
Bruce wrote:
Quote:
[.....] I had hoped to find a purely VBA solution |
I remember a discussion in a German newsgroup and Sascha posted a proposal
based on the Win32 classes and WMI :
Sub GetAccessSoftware()
Dim objWMIService As Object
Dim colSoftware As Object
Dim strComputer As String
Dim objItem As Variant
strComputer = "localhost"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery( _
"Select * from Win32_SoftwareFeature " & _
"WHERE Name='AccessFiles'")
On Error Resume Next
For Each objItem In colSoftware
Debug.Print "Name: " & objItem.Name, objItem.Caption
Debug.Print , objItem.IdentifyingNumber
Debug.Print "Version: " & objItem.Version
Debug.Print "Status: " & IIf(objItem.InstallState > 2, _
"Installed", objItem.InstallState)
DoEvents
Next
Debug.Print "Ready"
End Sub
The result on my current machine is this:
Name: ACCESSFiles Microsoft Office Access
{90110407-6000-11D3-8CFE-0150048383C9}
Version: 11.0.8173.0
Status: Installed
Ready
For more details this site may be helpful:
http://msdn.microsoft.com/en-us/libr...84(VS.85).aspx
An other pointer was set to this approach:
http://www.mvps.org/access/api/api0065.htm
Regards
Jens