Solved

Determine if 32-bit or 64-bit version of Access is installed

Posted on 2013-05-24
6
1,989 Views
Last Modified: 2013-05-31
I am distributing an Access based application using .accde files. My software first runs an executable created in Visual Basic 2010 which checks the version of the local file against the version on a network share and copies the file from the network share to a local folder if it is newer. The problem is that some of my customers have 64-bit Access installed and when they open the .accde file created in 32-bit access, they receive the message 'This database was created with the 32-bit version of Microsoft Access. Please open it with the 32-bit version of Microsoft Access.' I would like to be able to reliably determine in my visual basic program whether 64-bit Microsoft Access in installed so that I can copy the appropriate .accde file (64-bit or 32-bit) to the local computer. Is there a registry key I can look for or can I analyze the msaccess.exe file itself?
0
Comment
Question by:Steve_Reschke
6 Comments
 
LVL 11

Accepted Solution

by:
Guru Ji earned 250 total points
ID: 39194202
Hi,

I am running Win 7 64 bit and I know that if you have Office 32 bit application then your registry path is as following : "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot" Path.

And if you have 64 bit application then your registry path is as following: "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common\InstallRoot"

I am sure this should apply to Win 32 bit machines too. Hope that helps
0
 
LVL 13

Expert Comment

by:Alexander Eßer [Alex140181]
ID: 39194205
0
 

Expert Comment

by:AndyHoughtonCanada
ID: 39194228
I would use the registry keys. Here is something I have used for Outlook. You would have to use something similar for MS Access.

Check this out: http://technet.microsoft.com/en-us/library/ee681792.aspx



If you have included Outlook 2013 in your Office 2013 installation, Outlook sets a registry key named Bitness of type REG_SZ on the computer on which it is installed. The Bitness registry key indicates whether the Outlook 2013 installation is 32-bit or 64-bit. This might be useful to administrators who are interested in auditing computers to determine the installed versions of Office 2013 in their organization.

Registry path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Outlook


Registry key: Bitness


Value: either x86 or x64




If you have included Outlook 2013 in your Office 2013 installation, Outlook sets a registry key named Bitness of type REG_SZ on the computer on which it is installed. The Bitness registry key indicates whether the Outlook 2013 installation is 32-bit or 64-bit. This might be useful to administrators who are interested in auditing computers to determine the installed versions of Office 2013 in their organization.

Registry path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Outlook


Registry key: Bitness


Value: either x86 or x64
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:Steve_Reschke
ID: 39194257
The Bitness key is present for most but not all installations of Office. If Access is installed as a separate product, that registry key is not present.
0
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 total points
ID: 39194471
I would create a small DB to test and have it write a flag of some type (file on disk, registry entry, orrecord in a table), which the VB program can then read.

The test is to check for the compiler directive Win64.   If that is true, then the VBA code is running 64 bit.  If false, then it's running 32bit. ie.

#if Win64 then
   ' Do something to indicate running in 64 bit mode
#else
    ' Do something to indicate running in 32 bit mode
#end if

  Call this small DB from your VB 6 program (ie. Shell() or fire up Access with OLE automation), run the one procedure with the check, then quit), then continue on in the VB program.

Jim.
0
 

Author Closing Comment

by:Steve_Reschke
ID: 39211632
I have tried both of these accepted solutions and found them viable. I have yet to find an installation that has Access 64-bit that does not have the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common\InstallRoot registry key and because that solution is easier to implement I found it to be the best answer.
Thank you for your help.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now