Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access runtime becomes the default 1

Status
Not open for further replies.

KornGeek

Programmer
Aug 1, 2002
1,961
0
0
US
After doing Access development for some time, I'm finally getting around to deploying my databases with the runtime version of Access. The main reasons for this are:

A) Some customers don't have (or want to purchase) Access.

2) I will be able to have some control over which version of Access they are using, and thereby reduce the chance for tech support calls due to incompatability between Access versions. (I still have nightmares over the switch between 97 and 2000.)

After several hurdles, I finally got my installer installing Access 2002 (XP) without overwriting an existing version. (This involved creating an InstallShield installation, and then editing it with Orca. Not pretty, but effective.) Just as I was celebrating, I discovered that during installation, the runtime version of Access set itself as the default program for mdb and other file types.

I realize I can go in and manually change these back. However, try explaining that to a customer that has just installed 20 copies of your database, and still needs the full version to get into their own databases. I want to avoid that phone call at all costs.

How can I prevent the Access runtime from taking over control? I don't want it to set itself as the default ever, not even if they have no previous version selected.

I appreciate whatever help you can offer.
 
I'm not sure you can. Unfortunately, even though you can run multiple versions of MS Access on one machine it doesn't do it very well.

I suspect this is a Windows setting anyway (you're changing the default program to open MDB files from one Access version to another).

One possible workaround would be to give them shortcuts to open all their databases and explicitly specify, within the shortcut, which version of MS Access the database should open in.

Ed Metcalfe.

Please do not feed the trolls.....
 
Perhaps you can rename your access files.
Instead of calling your program 'YourProgram.MDB',
try calling the program 'YourProgram.MDX'. Now associate the Access run time with files whose extension are 'MDX' this should solve your problem.

Hope This Helps,
Hap... [2thumbsup]

Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
Nice idea. Hadn't thought of that!

Ed Metcalfe.

Please do not feed the trolls.....
 
Thanks for the feedback. I'm planning to use Ed2020's idea of shortcuts explicitly stating which version to run for the databases I install. However, they may have others previously installed and I doubt your average customer would want to have to go create shortcuts for something that previously worked.

Hap007,
Unfortunately, it's setting itself up as the default without my intervention. As far as I can tell, there's no way for me to specify what it becomes the default for. If it were up to me, it wouldn't become the default for any file type. I would simply use my shortcuts to specify the path to the runtime version.

How can I keep it from automatically becoming the default for mdb files?
 
<SNIP> ow can I keep it from automatically becoming the default for mdb files? <SNIP>

As far as I'm aware you can't.

Ed Metcalfe.

Please do not feed the trolls.....
 
I also use the shortcuts in this situation - but it has its own problems - the user can delete the shortcut and then put one back that does not specify Access version or they can open a version of Access from the Programs list and then select the application to run.

Korngeek: Could you give more details on the editing of Installshield using Orca?
 
Ed2020,
I have some good news. I found a way to do it. It's not clean or easy, but it works. It involves using Orca to edit the msi created by the Package and Deployment Wizard.

evalesthy,
I have a lot of security enabled on my databases. Users are unable to open the database from the standard mdw file, so they can't simply open Access and then open my database (unless they change their default mdw first). The main thing to keep in mind is that you can't use the runtime to enforce security. Giving them the shortcut to the runtime is simply a way to make it so they have to actively bypass this to use any other version of Access. It prevents users from accidentally making my life more complicated.

The solution:
Orca is a utility that is freely available from Microsoft. You first download and install their Win Installer SDK, and this will create an msi on your system for Orca. Installing this puts it in your startup menu.

Orca allows you to open an msi file (such as one created by Installshield, the Package and Deployment Wizard, etc.) and edit it. The interface reminds me of editing a registry. The documentation leaves much to be desired. However, it does work.

The way I did this was to create the AccessRT installer using the Package and Deployment Wizard. I then opened this with Orca and went in and edited it to remove the settings I didn't want. Unfortunately, I'm not sure of every place I edited, but it's easy enough to search for "mdb" and find each place it is entered.

From what I remember, I modified the Extension table, the MIME table (not sure if this one was necessary), the Registry table, the RemoveRegistry table, and the Verb table. I think that was all of them, but I'm not 100% positive.

After modifying this msi, I configure the Merge Module under Installshield to use this and created my installation. I then opened the msi created by InstallShield using Orca. In the CustomAction table, there is an entry for InstallAccess.993DD31D_8E47_11D4_AB67_00C04F0971B2. It was set to REBOOT=ReallySuppress ALLUSERS=[ALLUSERS]. I appended INSTALLLOCATION="C:\ACCESS2K2RT" to this (where "C:\ACCESS2K2RT" is the folder where I'm installing the runtime during testing) so that it read:

REBOOT=ReallySuppress ALLUSERS=[ALLUSERS] INSTALLLOCATION="C:\ACCESS2K2RT"

This prevents the runtime version from overwriting a previously installed full version of Access. I modified my Access shortcut to go to "C:\ACCESS2K2RT\Office10\MSACCESS.EXE" to launch the runtime version. In my testing so far, it seems to install the runtime, and run from it if I use my shortcut. If I open an mdb without a shortcut, it is opening it in the full version of Access installed on the system.

I need to do further testing before I'm sure I have this down 100% (and I need to disable settings for mde, mda, etc. file extensions), but I believe I'm on the right track.

Thank you to those who offered assistance, and I hope this can help somebody else down the line.
 
KornGgeek: That's great information - have a star. If you gather more understanding down the road it would be great if you could continue to share it with us. Many thanks.
 
Hi,

This group seems pretty knowledgeable.... do you know how to make the runtime the default? I've used Access Package Wizard and it does not work for me. I'm creating the setup.exe on Windows XP, and my target app is Windwos 2000, and it creates the setup.exe fine, but when I run the setup.exe on the Windows 2000, the shortcut is incorrect. It says "c:/program files/microsoft office/office11" /runtime "c:/application.mdb" in the shortcut, but there is not directory of that name, it actually named it:

"c:/program files/microsoft office XP/office11"

(with the XP in it).

I don't know how to change the pathname automatically so my end-users won't have to. Anyone have ideas on how to explicitly set the SHORTCUT path in Package Wizard???

Thanks,
Frustrated & Confused.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top