The IBM® Data Server
Driver package merge modules allow you to distribute IBM Data Server Driver component in your .NET
application installer package. You can create your own .NET application
installer that includes the IBM Data
Server Driver component.
About this task
The following procedure uses Installshield.
Procedure
To create an application installer which includes IBM Data Server Driver package merge
module, complete the following steps:
- Create a .NET application that is to be installed as a
part of IBM Data Server Driver
merge module. It should refer to the .Net dll from the specific folder,
that is based on the framework used.
The dll file is found
in the following path: C:\DS_driver_install_path\bin\netf40\specific\IBM.Data.DB2.version.dll,
where version is the version of the data server software.
For example, create a Simple .NET connection application
with the following sample parameters
- Connection Code
conn.ConnectionString = "database=" + database_name + ";userid=" + user_name ";Password=" + password ";server=" + ip_address + ":" + port_number ; conn.Open();
- Reference
C:\DS_driver_install_path\bin\netf40\specific\IBM.Data.DB2.VV.R.M.dll
Where
the DS_driver_install_path is the target directory where you want the merge
module files to be installed, as specified below in step 8b. VV.R.M is the version, release, and
modification number of the Data Server Driver. Examples include 10.5.2
and
11.1.0
.
- Add a private path to the App.config file
so that the application finds the referred dll files in the specified
path.
- For example, insert the following sample code in the App.config file:
<runtime>
<assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin\netf40\specific"/>
</assemblybinding>
</runtime>
- Build the application and generate the executable file
for the application.
- Ensure the following Microsoft merge
modules, available in the IBM Data
Server Driver Package image, located under the MergeModules directory,
are copied to the same directory as IBM_Data_Server_Driver_Package.msm.
Option |
Description |
For nt32 |
- Microsoft_VC90_CRT_x86_RTM21022.msm
- Microsoft_VC110_CRT_x86.msm
|
For ntx64 |
- Microsoft_VC90_CRT_x86_RTM21022.msm
- Microsoft_VC90_CRT_x86_x64_RTM21022.msm
- Microsoft_VC110_CRT_x86.msm
- Microsoft_VC110_CRT_x64.msm
|
- Open Installshield. Click . Enter the project name and the location. Click OK.
- Click . Select the
path where the merge modules are located. Ensure that the Matching
files must have the same version and Matching
files must have the same destination check boxes are selected.
Click OK.
- From the Installation Designer tab,
click . Update the Product
Name, Product Version, INSTALLDIR,
and Publisher.
Note: In the case
of a 64-bit installer, update the Template Summary value
to AMD64;1033.
- Under Application Data, click . Enter the new feature name you
want to associate. Click OK.
The
Merge
Modules Properties window opens. If this window does not
automatically open, right-click the merge module and click
properties.
Note: Ensure
that the Microsoft re-distributable
merge modules, referred to in step 3, are auto-selected.
- In the Merge Modules Properties window:
- In the Configurable values tab,
choose a unique IBM data server
driver copy name and, if you want to use a silent installation, enter
the path to the response file.
- In the Destination tab, choose
the target directory where you want the merge module files to be installed.
For example, if you choose INSTALLDIR the
DSDRIVER merge modules is installed in the application install path.
- From the Project Assistant tab,
click Application Files and then click Add
Files. Select the .NET application .exe file
and config file that pertain to your project.
- From the Project Assistant tab,
click Build Installation. Select the install
image type which best suits your requirements and click Build
Installations.
For example, if you choose Single
Executable, the setup.exe file is
created.
The setup.exe file
is created in the location that you specified.
What to do next
If you are installing silently, update the following parameters
in the IBM Data Server Driver
Package response file:
LIC_AGREEMENT = ACCEPT
DB2_COMMON_APP_DATA_TOP_PATH
DB2DSDRIVER_CFG_SOURCE_PATH