How do I find the path to msaccess.exe without using Access?

  • Thread starter Thread starter A C
  • Start date Start date
A

A C

Hi

We need to make a console app (exe) in c++ which will open a MS Access
database with certain input parameters (wrkgrp file, username and pw). As
part of this we need the path to msaccess.exe, which may be different on
different machines and different for different versions of Access.

In Access I used to get this info using the code SysCmd(acSysCmdAccessDir),
but as we are not using access (we will be using c++) I cannot use this
function.

Can someone give me some help here?

Thanks
AC
 
There's an example at the following URL that calls the API function
FindExecutableA in Shell32.dll. The example is in VBA, so you'll have to
translate. Alternatively, now that you know the name of the API function to
look for, doubtless there are C++ examples out there somewhere.

http://www.mvps.org/access/api/api0023.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top