473,394 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Q: Which Access version

Hi

How can I find which version of Access is installed on a computer from
within a vb.net application?

G
Mar 2 '07 #1
8 1615
On Mar 2, 3:20 am, "G .Net" <nodamns...@email.comwrote:
Hi

How can I find which version of Access is installed on a computer from
within a vb.net application?

G
I believe it shows up in the registry under the version. For example
if Access 2007 (12.0) is installed the following keys will be created:

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\A ccess
HKEY_CURRENT_MACHINE\Software\Microsoft\Office\12. 0\Access

Thats about all I can think of.

Thanks,

Seth Rowe

Mar 2 '07 #2
On Fri, 2 Mar 2007 08:20:43 -0000, "G .Net" <no********@email.comwrote:

¤ 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)
Mar 2 '07 #3
Hi Paul

Thanks for the suggestion. However I was more interested on knowing which
version(s) are on the client machine rather than the version type of a file.
Any ideas?

G

"Paul Clement" <Us***********************@swspectrum.comwrote in message
news:74********************************@4ax.com...
On Fri, 2 Mar 2007 08:20:43 -0000, "G .Net" <no********@email.comwrote:

¤ 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)

Mar 2 '07 #4
Hi again

Just to make it a little clearer what my intention is; in the application
I'm writing the client has to have Access 2003 so I'm intending to put a
warning message if it isn't installed on the client machine.

G

"Paul Clement" <Us***********************@swspectrum.comwrote in message
news:74********************************@4ax.com...
On Fri, 2 Mar 2007 08:20:43 -0000, "G .Net" <no********@email.comwrote:

¤ 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)

Mar 2 '07 #5
On Fri, 2 Mar 2007 15:13:01 -0000, "G .Net" <no********@email.comwrote:

¤ Hi again
¤
¤ Just to make it a little clearer what my intention is; in the application
¤ I'm writing the client has to have Access 2003 so I'm intending to put a
¤ warning message if it isn't installed on the client machine.

The major file version will correspond to a product version. For example, if Access 2003 is
installed then the code should return a major file version of 11.
Paul
~~~~
Microsoft MVP (Visual Basic)
Mar 2 '07 #6
G. Net

Are you sure you need the Access version. This is an office part and
versions you need for ineroperatability.

Most of us have used the Jet engine, which is/was free and is/was used in
Access as well.

Cor

"G .Net" <no********@email.comschreef in bericht
news:cO******************************@pipex.net...
Hi

How can I find which version of Access is installed on a computer from
within a vb.net application?

G

Mar 4 '07 #7
Hi Cor

I could generalise the question so that it isn't database specific e.g. how
can I find the version of Word on a client machine from code. I'd prefer not
to examine a file because that would mean implicitly creating one and then
testing it. Rather, I suspected, and an earlier post suggested that it could
be done via the registry?

G

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
G. Net

Are you sure you need the Access version. This is an office part and
versions you need for ineroperatability.

Most of us have used the Jet engine, which is/was free and is/was used in
Access as well.

Cor

"G .Net" <no********@email.comschreef in bericht
news:cO******************************@pipex.net...
>Hi

How can I find which version of Access is installed on a computer from
within a vb.net application?

G


Mar 4 '07 #8
I would do it by opening the application using OLE Automation and checking
the version information.

Try
xlApp = New Excel.Application()
MessageBox.Show("XL version is " & xlApp.Version)
Catch
MessageBox.Show("Excel is not installed, or I couldn't open it.")
Finally
xlApp.Close() 'I think it's close; it might be Quit
xlApp = Nothing
End Try

But feel free to muck around with the registry while you can. I think
that's a lot less likely to work in Vista with the clamped-down
permissions, although I haven't tried it yet.

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
-------------------------------------------------------------
"G .Net" <no********@email.comwrote in message
news:PZ******************************@pipex.net...
Hi Cor

I could generalise the question so that it isn't database specific e.g.
how can I find the version of Word on a client machine from code. I'd
prefer not to examine a file because that would mean implicitly creating
one and then testing it. Rather, I suspected, and an earlier post
suggested that it could be done via the registry?

G

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>G. Net

Are you sure you need the Access version. This is an office part and
versions you need for ineroperatability.

Most of us have used the Jet engine, which is/was free and is/was used
in Access as well.

Cor

"G .Net" <no********@email.comschreef in bericht
news:cO******************************@pipex.net.. .
>>Hi

How can I find which version of Access is installed on a computer from
within a vb.net application?

G



Mar 4 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: wolftor | last post by:
1) Is there a free runtime version of Access available that is more recent than the one for Access 2000? 2) If I create an application (MDE) in A2K, will it run on all later versions of Access?...
7
by: Danny | last post by:
I want to buy the latest version of ms access. Will this version let me create an mdb that will work with a lesser version such as 2000, I am having a problem going from 2002 to 2000. The mde will...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
33
by: Uwe Range | last post by:
Hi to all! A customer of mine told me some days ago that her IT-people told her ACCESS would not be such a good idea for continuing with our project, because Access will not be continued in the...
4
by: Br | last post by:
We're using an Access2000 ADP with an SQL2000 back-end. Because SQL2000 was released after Access2000 you need to be running Access2000 SP1 (2 or 3) for it to work properly. Is there an easy way...
92
by: Jeffrey P via AccessMonster.com | last post by:
Our IT guys are on a vendetta against MS Access (and Lotus Notes but they've won that fight). What I can't understand is, what's the problem? Why does IT hate MS Access so much. I have tried...
6
by: dbuchanan | last post by:
I have a Windows Forms application that accesses SQL Server 2k from a small local network. The application has been used for weeks on other systmes but a new install on a new machine retruns...
37
by: Allen Browne | last post by:
If you develop for others, you probably have multiple versions of Access installed so you can edit and create MDEs for clients in different versions. This works fine under Windows XP, even with...
17
by: Neil | last post by:
A client of mine likes some of the new bells and whistles in Access 2007, and is thinking about converting our A03 format MDB to an A07 format file. However, while some of the users have A07, many...
13
by: JakeD | last post by:
SInce about 1996, I have been happily using MS Access for Windows 95, but would now like to upgrade to a recent version. If I get a Windows XP version, will I be able to import all my Access 95...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.