View Full Version : Access runtime merge module

12-10-2002, 11:06 AM
Hi. I'm having a bit of a question with the access 2000 runtime, connected to my installshield package, and I was hoping that someone here might be able to help me out.

General background here. I have a VB data-driven application that connects to a password-protected access file as the data store, using ADO, and passes execution to an access MDE front end (that connects to the same data store,) to generate certain reports.

Now, the VB app passes context information to the MDE file through the /cmd command-line switch and the command function in access VBA. This works fine so long as I point the shell command to the msaccess executable directly:

shell ("c:\folder\msaccess.exe """ & app.path & "\reporter.mde"" /runtime /cmd pfk=" & pfk, vbNormalFocus)

So far so good.

The issue is that I need to know at compile-time where a copy of msaccess.exe is located, or at the least, be assured that the correct folder is on the PATH

Now, running my installshield package with the access 2000 runtime merge module on a sample test machine, I have found that it drops the runtime msaccess.exe in program files\microsoft office\art\office Good enough. But when I run the same package on my development machine, it doesn't even create the \art subdirectory in microsoft office. Is that because I already have a full version of access on my development machine?

Is there any way to force the access runtime to drop files in a particular directory no matter whether a full version of access is on the target computer? Or does anyone have any other ideas here?

I suppose, come to think of it, that I could leave the directory for msaccess.exe off the shell command and use the environment variables feature of installshield to add both program files\microsoft office\art\office and program files\microsoft office\office to the path, which would be alright as long as they had office installed in the default location. But I'd rather not count on that.

Or is there a way to set up a file association so that I can just shell to my mde file and the command line switches will be carried along?

Thanks in advance to anyone who replies.