determine if access runtime 2010 is installed (1 Viewer)

perlfan

Registered User.
Local time
Today, 01:31
Joined
May 26, 2009
Messages
192
Hi,

I like to determine if a user has Access Runtime 2010 installed (because if not I want to start a download process and install it).

Is there a unique registry key that I can check? Havn't found it despite extensive googling.... thx for help!!

Frank
 

spikepl

Eledittingent Beliped
Local time
Today, 10:31
Joined
Nov 3, 2010
Messages
6,142
So what is wrong with what you get by stuffing "determine if a user has Access Runtime 2010 installed" into google?
 

perlfan

Registered User.
Local time
Today, 01:31
Joined
May 26, 2009
Messages
192
Nothing! Well, I didn't post my problem here because I've a working solution elsewhere....

There are discussion on the topic - e.g. have I tried KEY_LOCAL_MACHINE,'SOFTWARE\Wow6432Node\Microsoft\Office\12.0\Access\InstallRoot but it's not working for detecting if AR 2010 is on the system or not.
 

spikepl

Eledittingent Beliped
Local time
Today, 10:31
Joined
Nov 3, 2010
Messages
6,142
Since 12.0 refers to Office 2007 no wonder it does not tell you if A2010 runtime is installed. You need 14.0
 

spikepl

Eledittingent Beliped
Local time
Today, 10:31
Joined
Nov 3, 2010
Messages
6,142
Code:
Function GetAccessPath() As String
    Dim objFSO As Object
    Dim sAccessDir As String
    Dim sFileVersion As String
    Dim sHKLM As String
    Dim WshShell As Object

    Set WshShell = CreateObject("WScript.Shell")

    ' Determine 32/64-bit Processor Architecture
    If InStr(1, _
             WshShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%"), _
             "64") > 0 Then
        sHKLM = "HKLM\SOFTWARE\Wow6432Node\"
    Else
        sHKLM = "HKLM\SOFTWARE\"
    End If

    ' Retrieve the directory for MSACCESS.EXE
    sAccessDir = WshShell.RegRead(sHKLM _
                                  & "Microsoft\Windows\CurrentVersion\App Paths\MSACCESS.EXE\Path")

    Set WshShell = Nothing

    Set objFSO = CreateObject("Scripting.FileSystemObject")
    sFileVersion = objFSO.GetFileVersion(sAccessDir & "MSACCESS.EXE")
    Set objFSO = Nothing

    Select Case Split(sFileVersion, ".")(0)
        Case "8"
            ' 97
        Case "9"
            ' 2000
        Case "10"
            ' 2002
        Case "11"
            ' 2003
        Case "12"
            ' 2007
        Case "14"
            ' 2010
            Debug.Print "2010"
        Case "15"
            ' 2013
            Debug.Print "2013"
    End Select
    GetAccessPath = sAccessDir & "msaccess.exe"
End Function

Surely you do not care whether it is Runtime or full version? The above code tells you if you have any Access installed.
 

perlfan

Registered User.
Local time
Today, 01:31
Joined
May 26, 2009
Messages
192
True, it's Office 14. Doesn't work either.

It's exactly what I want: to determine if Runtime is installed, so that every user is running the app on the same conditions. And download / installation shall only be initiated if Runtime is not installed.

Regards, Frank
 

CJ_London

Super Moderator
Staff member
Local time
Today, 09:31
Joined
Feb 19, 2013
Messages
16,629
retype your db as accdr which will force everyone to run in runtime, even if they have access installed.

And if you use package and sign there is an option to install runtime if the full version is not installed
 

perlfan

Registered User.
Local time
Today, 01:31
Joined
May 26, 2009
Messages
192
I'm using Inno. Seems as if I have to give my goal to determine between Access full version and Access Runtime....
 

Frothingslosh

Premier Pale Stale Ale
Local time
Today, 04:31
Joined
Oct 17, 2012
Messages
3,276
While I've never tried to do it, my expectation would be that either you can't install the runtime on a machine with the same or a later version of Access on it, or it could cause conflicts.

If you take CJ_London's advice and deploy as an accdr file (and you can do this to both accdb and accde files), then it won't matter if they have a full install, as even a full install will act as the runtime when running the file. If you have users changing it back FROM accdr, then that's a personnel problem.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 09:31
Joined
Feb 19, 2013
Messages
16,629
Code:
 I'm using Inno
What is Inno?
 

spikepl

Eledittingent Beliped
Local time
Today, 10:31
Joined
Nov 3, 2010
Messages
6,142
perlfan - if you have a fancy Inno script pls do share :D

CJ_London : free Installer
 

perlfan

Registered User.
Local time
Today, 01:31
Joined
May 26, 2009
Messages
192
accdr is nice. I used the .accde /runtime shortcut till now which works too, but the simpler the better.

On my machine with Access 2010 full version and Runtime 2010 accdr opens in Runtime. On my partners machine with Access 2007 full version and Runtime 2010 the accdr file starts an Access 2007 configuration process which ends in an error stating that the file has been compiled with a newer Access version than 2007.... :-/ I thought I could force it to open the file with Access 2010....does anybody where the bug is?

BTW: I attached my inno script. You need the inno downloader for it as it downloads the accessruntime only if not installed. It's not perfect, so advice is always welcome.... :)
 

Attachments

  • Access Runtime 2010.zip
    2.6 KB · Views: 74

spikepl

Eledittingent Beliped
Local time
Today, 10:31
Joined
Nov 3, 2010
Messages
6,142
Your issue is not the engine as such but version. Access does this reconfiguration thing if you have two versions installed at the same time.

Some time ago there was a post - i reckon in this forum - by a user who managed to find a couple of registry settings which allowed him to select which Access version he wanted to run without going through this reconfiguration process. I'd suggest you use this google link (set to search AWF only) http://www.google.co.uk/advanced_se...en&cr=countryUK|countryGB&safe=off&as_qdr=all

and try with keywords like
versions
registry

etc


And thx for the INNO -thing :D
 

CJ_London

Super Moderator
Staff member
Local time
Today, 09:31
Joined
Feb 19, 2013
Messages
16,629
It may be that using the access installer rather than inno may solve the problem since it may be doing more than you have scripted inno to do
 

perlfan

Registered User.
Local time
Today, 01:31
Joined
May 26, 2009
Messages
192
@spikepl: Unfortunately I didn't find anything on a possible workaround....
@CJ_London: Inno is so much more flexible than the developer tools. And I don't think that the tools will force Windows to use the Runtime engine instead of switching a full version into Runtime mode.

For me, the "solution" will be to compile with an older Access version (2007) instead of with 2010 to prevent (reconfiguration) errors caused by older Access full versions simply put in Runtime mode....
 

CJ_London

Super Moderator
Staff member
Local time
Today, 09:31
Joined
Feb 19, 2013
Messages
16,629
And I don't think that the tools will force Windows to use the Runtime engine
I didn't say it would, I'm suggesting it might solve the problem 'which ends in an error stating that the file has been compiled with a newer Access version than 2007'
 

Users who are viewing this thread

Top Bottom