473,746 Members | 2,172 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1649
On Mar 2, 3:20 am, "G .Net" <nodamns...@ema il.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_US ER\Software\Mic rosoft\Office\1 2.0\Access
HKEY_CURRENT_MA CHINE\Software\ Microsoft\Offic e\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********@ema il.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.dl l" Alias "FindExecutable A" (ByVal lpFile As
String, _
ByVal lpDirectory As
String, _
ByVal lpResult As
System.Text.Str ingBuilder) As Int32

Function GetAccessVersio n() As String

Dim DummyFile As String
Dim FileDir As String

Dim FilePath As New System.Text.Str ingBuilder(255)

DummyFile = "C:\Test Files\AccessXP. mdb"

If FindExecutable( DummyFile, FileDir, FilePath) 32 Then
Return
System.Diagnost ics.FileVersion Info.GetVersion Info(FilePath.T oString).FileMa jorPart()
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************ ***********@sws pectrum.comwrot e in message
news:74******** *************** *********@4ax.c om...
On Fri, 2 Mar 2007 08:20:43 -0000, "G .Net" <no********@ema il.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.dl l" Alias
"FindExecutable A" (ByVal lpFile As
String, _

ByVal lpDirectory As
String, _

ByVal lpResult As
System.Text.Str ingBuilder) As Int32

Function GetAccessVersio n() As String

Dim DummyFile As String
Dim FileDir As String

Dim FilePath As New System.Text.Str ingBuilder(255)

DummyFile = "C:\Test Files\AccessXP. mdb"

If FindExecutable( DummyFile, FileDir, FilePath) 32 Then
Return
System.Diagnost ics.FileVersion Info.GetVersion Info(FilePath.T oString).FileMa jorPart()
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************ ***********@sws pectrum.comwrot e in message
news:74******** *************** *********@4ax.c om...
On Fri, 2 Mar 2007 08:20:43 -0000, "G .Net" <no********@ema il.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.dl l" Alias
"FindExecutable A" (ByVal lpFile As
String, _

ByVal lpDirectory As
String, _

ByVal lpResult As
System.Text.Str ingBuilder) As Int32

Function GetAccessVersio n() As String

Dim DummyFile As String
Dim FileDir As String

Dim FilePath As New System.Text.Str ingBuilder(255)

DummyFile = "C:\Test Files\AccessXP. mdb"

If FindExecutable( DummyFile, FileDir, FilePath) 32 Then
Return
System.Diagnost ics.FileVersion Info.GetVersion Info(FilePath.T oString).FileMa jorPart()
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********@ema il.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 ineroperatabili ty.

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

Cor

"G .Net" <no********@ema il.comschreef in bericht
news:cO******** *************** *******@pipex.n et...
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******** ********@TK2MSF TNGP05.phx.gbl. ..
G. Net

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

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

Cor

"G .Net" <no********@ema il.comschreef in bericht
news:cO******** *************** *******@pipex.n et...
>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.Applicati on()
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********@ema il.comwrote in message
news:PZ******** *************** *******@pipex.n et...
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******** ********@TK2MSF TNGP05.phx.gbl. ..
>G. Net

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

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

Cor

"G .Net" <no********@ema il.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
4188
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? 3) If I create a CD using A2K Developer that includes the runtime version of Access 2K and an installation package, and if someone tries to install the application from the CD, what happens if someone already has Access 2000 or a later version...
7
4229
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 not work. Is there a place you recommend that has it for a decent price? Thanks
6
4751
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 appreciated. Thanks in advance
33
5952
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 future. I haven't heard of this. Does anybody know more about it? The IT-People usually prefer Oracle. If they really want to go in this direction, could our Access-application (if continued) be used as a front end with an Oracle back end? Does...
4
7186
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 for the ADP to determine programatically wether the correct service pack is installed (or if they are using a newer version such as 2002/2003)? Ta.
92
7666
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 to find out who it is that actually wants to get rid of it, but I can't find anyone who will admit to trying to get rid of it. Nevertheless, I'm always hearing about how their "phasing it out" or "getting rid of it". Because no-one owns up I can't...
6
2569
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 errors. The machine is a new laptop Windows XP Pro SP2 The machine is up to date with respect to the dot net framework. Details: Dot Net Framework ver. 1.0.3705 is installed Dot Net Framework ver. 1.1.4322 is installed
37
3740
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 Access 2007 installed. It does *not* work under Windows Vista Ultimate. After running Access 2007, when you open an earlier version of Access, no code works, because the references are fouled up. And Access 97 does not work at all. Access should...
17
7666
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 do not, and it's not clear when they would get it. His thought was to use the upcoming Access 2007 runtime to allow the users who are still running Office 2003 to be able to run the database. While I use multiple versions of Access on my...
13
2535
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 files without problems? Alternatively, should I continue applying the "if it ain't broke, don't fix it" approach, and keep on using Access for Win 95? Thank you for any advice.
0
9491
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9348
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8221
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6057
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4573
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4829
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3288
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2196
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.