Page 1 of 1

How-to: Install Borland Database Engine as a pre-requisite

Posted: Mon Jul 31, 2006 11:07 am
by Tinus
Hi IA users,

this is a short "how-to" that will demonstrate how easily you can extend the powerful
InstallAware IDE with additional pre-requisites.

Why have I done this? I have one application which is still based on the Borland BDE.
I tried the BDE merge modul and dectected a couple of pitfalls with that. The biggest
problem is the fact, that the internal custom actions only run in UI mode. If you do a
slient install they do not work. And this affects the detection of an already installed BDE.
Futhermore the merge module ignores the use count on uninstall.

So I decided to create a new pre-requisite for the BDE. This has a couple of advantages.
The setup is smaller if the BDE is already present thanks to the web media blocks.
I have full control over the install/uninstall process and I can decide if I upgrade an
existing BDE or not. And finally I can fix the silent install issue.

Creating a new pre-requisite requires two parts: You need to create a setup package
for your pre-requisite and you need to create some scripts to check and install this package.

There's a pretty good description of the process on the InstallAware web: ... s_view.pdf
Start with this document to get some basic knowledge.

Now some details:
1. For my setup package I created an empty installation and added only the merge module.

2. Next I created a checkbde52 script. This scripts is used to check for the pre-requisite.
Here I check for an existing BDE. I check the registry, a files and the file version.
Do what ever you need here.

3. Then I created the setupbde52 script. This script is responsible for the
of the pre-requisit. I use a file bag to wrap my setup package from step 1 above.
Now comes the tricky part. If checkbde52 found an already existing but outdated BDE
I have the installation path for the BDE. If not I can use the default. Either way I need
to tell my setup package what path to use. But how can I modify this path inside
the merge module? Borland has documented that the merge module's internal
custom action uses the variable
for the path.

And now I can put it all together. Using an Install/Remove MSI command I add my
file bag as package file and use an Action string like this:

Code: Select all


Have a look at the attached scripts for more details.

4. Finally create a RTM file. This file specifies any software requirements for this
new pre-requisite together with the script names above.

Copy all 3 files into the InstallAware 6 runtimes folder. If you want to use the attached
scripts you need to create your own setup package with the merge module
from step 1 and specify the path for the file bag/Install MSI in step 3.

That's all. You now have a perfectly working pre-requisit in the great InstallAware IDE.
With a simple click you can add the BDE to any setup you work on.

If you have similar requirements use the attached scripts as a starting point.


File Attached:

Where is the version comparison?

Posted: Mon Aug 27, 2007 12:22 am
by lextm

Code: Select all

~InstallAware Clipboard Data~
~Get File Version~
~Set Variable~
~Check File Version~
~Check for version >
~Set Variable~

From the sample code I cannot see where you compare the versions of files. Could you provide more details in this section?

Posted: Thu Aug 30, 2007 5:27 am
by Tinus
I simply read the file version from idapi32.dll and compare this with the constant version (the latest from Borland). If different, BDE is installed (again).

Re: How-to: Install Borland Database Engine as a pre-requisite

Posted: Fri Sep 14, 2007 10:51 am
by Zodex
I have a few questions about your tutorial.

Tinus wrote:1. For my setup package I created an empty installation and added only the merge module.

1.Merge modul: I downloaded the merge modul from That is a exe file. How do you add this merge modul into your setup package? I only able to add merge modules like msm or msi files into a setup package.

2. setupbde52.mia: In this file there are these lines:

Code: Select all

"ADDLOCAL=ALL BDE_INSTALL_PATH.E966F0CB_76B3_11D3_945B_00C04FB1760A=""$BDEPATH$""",FALSE,,TRUE,"$BDESETUPPATH$\\Borland Database Engine 5.2.msi",,BDE52,,TRUE
"replace with your path to Borland Database Engine 5.2 setup files",TRUE,BDESETUPPATH

First of all where do you get the Borland Database Engine 5.2 setup files? You have mentioned only the BDE merge module that you have added into your seperate setup package. But i do not have any BDE setup "files".
Further, setupbde52.mia relates to mMSI.dll and myFileBagIDE.dll. Of course, i have to replace the names with my filenames, but again i do not have any of files like those after i have created the setup package.

I thank you in advance for replying.

Posted: Fri Sep 14, 2007 10:54 am
by Tinus
The exe file actually is an installer.Run it and you get the merge modules in your borland subdirs.

Posted: Mon Aug 11, 2008 1:41 pm
by FrankMCook
We have the Express version from C++Builder 2007. Can we use this technique to install the BDE or will we need a more powerful version of InstallAware?

We're having a lot of trouble trying to get the BDE to install properly in 64 bit Vista. I'm pretty sure we're going to have to install the BDE somewhere other than under Program Files and we'll need to set Registry Keys to tell it how to find itself and even more importantly to store everything it can in the cfg file instead of the Registry (in other words check the Win3.1 option box). Does anyone have this working using InstallAware?

Posted: Tue Sep 02, 2008 4:36 pm
by FrankMCook
We're well on our way to answering our own question. CodeGear does have a merge file that can be referenced in InstallAware Express. We're struggling a bit with the fact that it sets up the default configuration file under program files which means it can only be modified by the Administrator but we think we can get around that by addinga CFG file to our own distribution.

Re: How-to: Install Borland Database Engine as a pre-requisite

Posted: Thu Jun 14, 2018 9:57 am
by jmrunyan
I am trying this with IA X8. The BDE project runs by itself. When I create the project that uses the BDE Application Runtime it does the check and starts the install but returns failure.

Any Ideas