ABC Blocks


Database and Website Design, Development, and Deployment--All in the Service of Your Mission

We develop large Access databases that use numerous files to accomplish various tasks. Installing such a database and making sure everything ends up in the right place could be a lot of work. But using batch files can simplify this process immensely. When we distribute a database to a new user, all we have to do is e-mail a shortcut to one of the batch file for that application, and the installation can done with a simple double-click.

The flow of the process, once the shortcut has been double-clicked, is as follows:

  • The shortcut points to a batch file on the server.
  • The batch file then
  • creates any directories needed,
  • copies any files needed,
  • register's any dlls that haven't been registered,
  • starts a shortcut to your database, which
  • opens your database, using your workgroup file.

While installing the database is quite simple, setting up the installation is more involved. The layers of this scheme may include the following:

  • A shortcut that points to a batch file on the server
  • The batch file
  • The front end .mde file
  • The back end .mdb file
  • An icon file
  • A splash screen image
  • Dll files
  • Code library mdes
  • A database version file
  • A dll installation flag file
  • A shortcut to your database, to be called by the batch file
  • A workgroup information file

Using this method allows you to specify your workgroup without forcing your users to join this workgroup (see Security for a discussion of why this makes sense).

It also allows you to use the same shortcut and batch file no matter if your user has never installed the database, has an old version of the database installed, or is just starting the current version of the database, which is already on his or her PC. All of our databases get updated periodically, and we want to copy a new version of the front end from the server to the user's PC only when the user does not have the latest version. The batch files we use take care of this for me, using the database version file.

One other benefit of using a shortcut that points to a batch file is that if you need to stop users from starting up your database you can simply rename the batch file. That way you'll still be able to start the database, by simply double-clicking on the batch file in Window Explorer, but your users won't be able to use the icon on their desktops to start it.

Also, by having the batch file start a shortcut to the database, instead of the database itself, you get the DOS window to close as soon as the batch file has finished, instead of staying open until the database is closed. And a batch file can take care of all of these functions for me. You can also see a detailed description of the batch file for one of our databases.