Creating a .NET sample application installer with the IBM Data Server Driver package merge module

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.


To create an application installer which includes IBM Data Server Driver package merge module, complete the following steps:

  1. 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
      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.
  2. Add a private path to the App.config file so that the application finds the referred dll files in the specified path.
    1. For example, insert the following sample code in the App.config file:
      	<assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">
      		<probing privatePath="bin;bin\netf40\specific"/>
    2. Build the application and generate the executable file for the application.
  3. 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
  4. Open Installshield. Click File > New Project > Basic MSI Project. Enter the project name and the location. Click OK.
  5. Click Tools > Options > Merge Modules tab. 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.
  6. From the Installation Designer tab, click Installation Information > General Information. 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.
  7. Under Application Data, click Redistributables > IBM_Data_Server_Driver_Package. 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.
  8. In the Merge Modules Properties window:
    1. 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.
    2. 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.
  9. 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.
  10. 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: