¤ Hi
¤
¤ How can I find which version of Access is installed on a computer from
¤ within a vb.net application?
You can use the FindExecutable API function, which operates by file association. You just need a
valid path to an Access .mdb file (it can be a dummy file as well).
Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As
String, _
ByVal lpDirectory As
String, _
ByVal lpResult As
System.Text.StringBuilder) As Int32
Function GetAccessVersion() As String
Dim DummyFile As String
Dim FileDir As String
Dim FilePath As New System.Text.StringBuilder(255)
DummyFile = "C:\Test Files\AccessXP.mdb"
If FindExecutable(DummyFile, FileDir, FilePath) > 32 Then
Return
System.Diagnostics.FileVersionInfo.GetVersionInfo(FilePath.ToString).FileMajorPart()
End If
End Function
Paul
~~~~
Microsoft MVP (Visual Basic)