dbTalk Databases Forums  

Determine installed versions of Access?

comp.databases.ms-access comp.databases.ms-access


Discuss Determine installed versions of Access? in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bruce
 
Posts: n/a

Default Determine installed versions of Access? - 03-10-2011 , 11:03 AM






Hello,

I would like to be able to use VBA to enumerate the installed versions of Access on a particular machine. We have an environment in which many of ourusers have multiple versions of Access from 97 through 2007 (and yes, I amaware that 2007 does not coexist well with any previous version). Some may have multiple versions of Office but only one version of Access installed.. I would like to be able to identify all of the installed Access versionson all of these machines without visiting each one individually but ratherby putting a bit of code in a front end app that will log what versions they have installed to a central database. Does anyone have some code that will enumerate the installed Access versions? Thanks!

Bruce

Reply With Quote
  #2  
Old   
Jens Schilling
 
Posts: n/a

Default Re: Determine installed versions of Access? - 03-10-2011 , 02:04 PM






Hi, Bruce

Bruce wrote:
Quote:
[.....]
Does anyone have some code
that will enumerate the installed Access versions?
German MVP Sascha Trowitzsch offers a little tool named "AccessVersInfo" on
his site:

http://www.mosstools.de/index.php?op...59&It emid=61

The disadvantage might be that his site is in German only, but the
download-file not only contains a readme-file with some explanations in
English, but a sample database that contains some instruction in English,
too.

I think it's worth to take a look because it let you retrieve the version of
Access as well as installed Service Packs and Patches.

Regards
Jens

Reply With Quote
  #3  
Old   
Bruce
 
Posts: n/a

Default Re: Determine installed versions of Access? - 03-10-2011 , 03:16 PM



Thank you Jens! That's a great little tool. Unfortunately it relies on an executable that has to be copied to, and registered on, each user's machine. I had hoped to find a purely VBA solution but I do appreciate the suggestion!

Bruce

Reply With Quote
  #4  
Old   
Jon Lewis
 
Posts: n/a

Default Re: Determine installed versions of Access? - 03-11-2011 , 08:15 AM



Allen Browne has a Splash screen example which includes code for the Access
version here http://allenbrowne.com/ser-53.html

HTH

Jon


"Bruce" <deluxeinformation (AT) gmail (DOT) com> wrote

Quote:
Thank you Jens! That's a great little tool. Unfortunately it relies on
an executable that has to be copied to, and registered on, each user's
machine. I had hoped to find a purely VBA solution but I do appreciate
the suggestion!

Bruce

Reply With Quote
  #5  
Old   
Jon Lewis
 
Posts: n/a

Default Re: Determine installed versions of Access? - 03-11-2011 , 08:23 AM



I should have added that this relies on the path to the Access executable
being supplied by the current application so you would need a way to search
for the paths of any Access executables installed. Shouldn't be too
difficult with the FindFirstFile and FindNextFile api functions.

Jon


"Jon Lewis" <jon.lewis (AT) cutthespambtinternet (DOT) com> wrote

Quote:
Allen Browne has a Splash screen example which includes code for the
Access version here http://allenbrowne.com/ser-53.html

HTH

Jon


"Bruce" <deluxeinformation (AT) gmail (DOT) com> wrote in message
news:1de1a926-58d0-4bb3-a3ec-f17588506c11 (AT) glegroupsg2000goo (DOT) googlegroups.com...
Thank you Jens! That's a great little tool. Unfortunately it relies on
an executable that has to be copied to, and registered on, each user's
machine. I had hoped to find a purely VBA solution but I do appreciate
the suggestion!

Bruce


Reply With Quote
  #6  
Old   
Bruce
 
Posts: n/a

Default Re: Determine installed versions of Access? - 03-11-2011 , 09:34 AM



Thank you Jon. There's quite a bit of useful code in that example!

Bruce

Reply With Quote
  #7  
Old   
Jon Lewis
 
Posts: n/a

Default Re: Determine installed versions of Access? - 03-11-2011 , 12:41 PM



Also you can search through the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office
area of the registry to collect the MSACCESS.exe paths. e.g.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\ Access\InstallRoot etc

Jon


"Bruce" <deluxeinformation (AT) gmail (DOT) com> wrote

Quote:
Thank you Jon. There's quite a bit of useful code in that example!

Bruce

Reply With Quote
  #8  
Old   
Jens Schilling
 
Posts: n/a

Default Re: Determine installed versions of Access? - 03-12-2011 , 04:17 AM



Hi, Bruce

Bruce wrote:
Quote:
[.....] I had hoped to find a purely VBA solution
I remember a discussion in a German newsgroup and Sascha posted a proposal
based on the Win32 classes and WMI :

Sub GetAccessSoftware()
Dim objWMIService As Object
Dim colSoftware As Object
Dim strComputer As String
Dim objItem As Variant

strComputer = "localhost"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")

Set colSoftware = objWMIService.ExecQuery( _
"Select * from Win32_SoftwareFeature " & _
"WHERE Name='AccessFiles'")

On Error Resume Next

For Each objItem In colSoftware
Debug.Print "Name: " & objItem.Name, objItem.Caption
Debug.Print , objItem.IdentifyingNumber
Debug.Print "Version: " & objItem.Version
Debug.Print "Status: " & IIf(objItem.InstallState > 2, _
"Installed", objItem.InstallState)
DoEvents
Next

Debug.Print "Ready"

End Sub

The result on my current machine is this:

Name: ACCESSFiles Microsoft Office Access
{90110407-6000-11D3-8CFE-0150048383C9}
Version: 11.0.8173.0
Status: Installed
Ready


For more details this site may be helpful:
http://msdn.microsoft.com/en-us/libr...84(VS.85).aspx

An other pointer was set to this approach:
http://www.mvps.org/access/api/api0065.htm

Regards
Jens

Reply With Quote
  #9  
Old   
Tony Toews
 
Posts: n/a

Default Re: Determine installed versions of Access? - 03-13-2011 , 03:56 PM



On Fri, 11 Mar 2011 18:41:43 -0000, "Jon Lewis"
<jon.lewis (AT) cutthespambtinternet (DOT) com> wrote:

Quote:
Also you can search through the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office
area of the registry to collect the MSACCESS.exe paths. e.g.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\ Access\InstallRoot etc
Yes, that is the best solution. At least that's what the Auto FE
Updater uses so it must be perfect. <snicker>

I might go one step further and suggest verifying that the
msaccess.exe as per the "path" key actually exists. Then fetch the
version number to ensure users don't have old versions of msaccess.exe
on their system.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.