Solved

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

Posted on 2013-05-24
6
2,074 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

911 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

23 Experts available now in Live!

Get 1:1 Help Now