Steps for building the installer programs using Microsoft Visual Studio

Before you begin

You need to have a tool such as Microsoft Visual Studio that builds an installer program.

About this task

These instructions describe how to use Microsoft Visual Studio Software Application Version 2010 to create a setup and deployment Visual Studio project. The project creates a directory to save the project setup files along with the output files.

Perform the following steps to build the installer programs for a PKI Services ActiveX program.

Procedure

  1. Download the following files from the directory /usr/lpp/pkiserv/ActiveX/signsrc on the z/OS® system to a working directory on your workstation:
    • PKICEnroll.dll
    • PKICEnroll.tlb
    • PKICEnroll.reg
    • PKIActiveX.lic
    Note: Ensure that the files are transferred in binary format so that they are not modified in transit.

    _______________________________________________________

  2. Open Microsoft Visual Studio Software Application Version 2010 from the Windows Start menu, and create a new setup and deployment project.
    1. Click File > New Project.
    2. In the New Project panel, under Other Project Types select Setup and Deployment.
    3. In the Visual Studio installed templates pane (on the right) click Setup Project.
    4. In the Name field, enter the name of the project, for example PKICEnrollDeploy.
    5. In the Location field, enter the directory where you want the project created, or click Browse to select a directory.
    6. Select Create directory for solution.
    7. Click OK.
      A new project directory is created in a separate file directory in the path that is given in the Location field.

    _______________________________________________________

  3. Add the required ActiveX Dynamic link library, the ActiveX Type library file, and the ActiveX license file (PKIActiveX.lic) to the current project to create the installer program.
    1. Click View > Solution Explorer.
    2. Right click the name of the project that you just created, (for example, PKICEnrollDeploy).
    3. Click Add > File.
    4. On the AddFiles window, navigate to the directory where the files were stored on the workstation in step 1.
      For PKICEnroll select these files:
      • PKICEnroll.dll
      • PKICEnroll.tlb
      • PKIActiveX.lic
      Click Open. The files you selected are listed under the project on Solution Explorer. The DLL file has a dependency on Microsoft .NET Framework. Microsoft Visual Studio automatically lists the dependency under the project.

    _______________________________________________________

  4. Add the Microsoft C Runtime Library and Microsoft Active Template Library merge modules to be packaged in the installer program.
    1. On the Solution Explorer pane, right click the project name (for example, PKICEnrollDeploy).
    2. Click Add > Merge Module. A window opens listing all the merge modules that were installed when Microsoft Visual Studio was installed.
    3. Click Microsoft_VC100_CRT_x86.msm and Microsoft_VC100_ATL_x86.msm and click Open to add these files to the project.

    _______________________________________________________

  5. Modify the project properties.
    1. From the Solution Explorer pane, click the project name (for example, PKICEnrollDeploy).
    2. On the toolbar click View > Other Windows > Property Window. A list of properties with default values is displayed.
    3. For the Author property, enter IBM.
    4. For the InstallAllUsers property, enter True.
    5. For the Manufacturer property, enter IBM.
    6. For the ProductName property, enter PKICEnroll.
    7. For the RemovePreviousVersions property, enter True.

    _______________________________________________________

  6. Determine the default location where the ActiveX program is going to be installed.
    1. Click View > Solution Explorer.
    2. Right click the project (for example, PKICEnrollDeploy).
    3. Click View > File System. A file system pane opens on the right side.
    4. In the File System pane, right click Application Folder.
    5. Click Properties Window.
    6. Note the value listed in the Default Location field. This is the location where the ActiveX program is going to be installed. The default value is [ProgramFilesFolder][Manufacturer]\[ProductName]. The value of ProgramFilesFolder has been set by Microsoft Visual Studio to the Program Files folder for the operating system: C:\Program Files for a 32-bit Windows system and C:\Program Files(x86) for a 64-bit operating system. You set the value of Manufacturer to IBM® and the value of ProductName to PKICEnroll when you set the project properties in step 5. Do not modify any of these values. The ActiveX DLL looks for the license file (PKIActive.lic) in this directory. If it cannot find it there, the ActiveX program is not instantiated on the browser and certificate renewal processing might not work properly.

    _______________________________________________________

  7. The User Interface command provides the interface for the user during installation. It allows the user installing the ActiveX program to select a directory for installation. Disable the folder selection step, so that the location listed in step 6.f is used.
    1. Click View > Solution Explorer.
    2. Right click the project (for example, PKICEnrollDeploy).
    3. Click View > User Interface. A User Interface pane opens on the right side.
    4. Under Install, click Installation Folder and click Delete.
    5. Under Install, under End right click Finished and click Properties. Modify the UpdateText property to include instructions to be displayed to the user after the installation of the ActiveX program: Please refresh the PKI Certificate Renewal web page to use the newly installed PKI ActiveX Control.
    6. Under Administrative Install, click Installation Folder and click Delete.
    7. Under Administrative Install, under End right click Finished and click Properties.

      _______________________________________________________

  8. The setup and deployment project (for example, PKICEnrollDeploy) can create registry entries for the ActiveX program. Once the ActiveX program is installed on the target machine the ActiveX program is registered and the browsers accessing this ActiveX program instantiates looking at the windows registry. The registry entries are created using the Registry setup interface.
    1. Click View > Solution Explorer.
    2. Right click the project (for example, PKICEnrollDeploy).
    3. Click View > Registry. A Registry pane opens on the right side.
    4. Right click Registry on Target machine .
    5. Click Import. The Import Registry File window opens.
    6. Click PKICEnroll.reg and click Open.

    _______________________________________________________

  9. Set the ActiveX dynamic link library (PKICEnroll.dll) to be registered during installation.
    1. Click View > Solution Explorer.
    2. Right click PKICEnroll.dll.
    3. Click Properties.
    4. Set the Register field to vsdraCOM.

    _______________________________________________________

  10. Set the ActiveX type library (PKICEnroll.tlb) to be registered during install.
    1. Click View > Solution Explorer.
    2. Right click PKICEnroll.tlb.
    3. Click Properties.
    4. Set the Register field to vsdrfCOM.

    _______________________________________________________

  11. Build the setup and deployment project.
    1. Click View > Solution Explorer.
    2. Right-click the project name from the Solution Explorer (for example, PKICEnrollDeploy).
    3. Select Properties. The Property Pages window opens.
    4. Select Release in the Configuration list.
    5. On the right pane of the window that opens, click Prerequisites.
    6. Select the Create setup program to install prerequisite components check box.
    7. In the list of prerequisites, select the .NET Framework 4.0 Client Profile (x86 and x64) check box if it is not already selected.
    8. Select the Visual C++ 2010 Runtime Libraries (x86) check box.
    9. Click OK. The Prerequisites window closes.
    10. Click OK. The Property Pages window closes.
    11. Right-click the project (for example, PKICEnrollDeploy) and select Build.
      If the build is successful, the application creates an output directory under the root project directory that is under the main solution directory. If PKICEnrollDeploy is the project name:
      • C:\PKICEnrollDeploy is the solution name.
      • C:\PKICEnrollDeploy\PKICEnrollDeploy is the root project directory.
      • C:\PKICEnrollDeploy\PKICEnrollDeploy\Release is the output directory.
      • There are two output files: PKICEnrollDeploy.msi and setup.exe.

    _______________________________________________________

Results

When you are done, you have built the installer program for a PKI Services ActiveX program. Continue with step 2.c to sign the installer program.