Downloading the Oracle Basic Instant Client and the Oracle ODBC Instant Client and Creating an .msi Package and InstallShield Prerequisite for Both
InstallShield 2020
Project:This information applies to the following project types:
Before you can add support for the Oracle 11g Instant Client and the Oracle ODBC Instant Client to your Basic MSI, InstallScript, or InstallScript MSI project, you must download the Oracle Basic Instant Client and the Oracle ODBC Instant Client from Oracle’s Web site. Oracle does not provide an installation for the files, so you also need to create an .msi package; you can do so easily by using the Oracle Instant Client installation project that is available in the InstallShield Program Files folder.
Once you have created the .msi package, you can add it to the appropriate folder on your machine, and then add the InstallShield prerequisite that uses this Oracle .msi package.
To download the Basic Instant Client and the ODCBC Instant Client and create an .msi package:
Important:The Oracle support in InstallShield requires that the target system have the 32-bit version of the Basic Instant Client and of the ODBC Instant Client, regardless of whether the target system is a 32-bit or 64-bit system.
|
2.
|
Unzip the files to the root of your C drive. Unzipping the files adds all of the files to the following location: |
C:\instantclient_11_1
Ensure that the files are not unzipped to C:\instantclient11_1\instantclient11_1.
|
3.
|
Make a copy of the Oracle Instant Client installation project. The path for the project is as follows: |
InstallShield Program Files Folder\Support\Oracle Instant Client\instantclient-win32-11_1.ism
Name the copy instantclient-win32-odbc11_1.ism, and put it in the same directory as the original .ism file. The path for this new file is:
InstallShield Program Files Folder\Support\Oracle Instant Client\instantclient-win32-odbc11_1.ism
Revenera created the instantclient-win32-11_1.ism project for the 11.1.0.7 version of the Oracle Instant Client; however, you can use this same project for more-recent versions of the Oracle 11g Instant Client and ODBC Instant Client, such as 11.2.01, for example.
|
4.
|
Open the new project that you created in InstallShield. |
|
5.
|
Update the product code, the upgrade code, and the product name: |
|
a.
|
In the View List under Installation Information, click General Information. |
|
b.
|
In the Product Code setting, click the Generate a new GUID button ({..}). |
|
c.
|
In the Upgrade Code setting, click the Generate a new GUID button ({..}). |
|
d.
|
In the Product Name setting, change the existing text as needed. |
Oracle11g Instant Client - ODBC 11.1.0.7
The name that you enter is displayed at run time during the Oracle installation. If you want to change this name to something else to reflect a different version number, such as 11.2.0.1 or 11.2.0.x, you can do so.
|
6.
|
If you are using a version that was released after 11.1.0.7 and it requires any dependencies, add the files or merge modules to the project. |
|
7.
|
Add a custom action that launches the ODBC Instant Client installation: |
|
a.
|
In the View List under Behavior and Logic, click Custom Actions and Sequences. |
|
b.
|
In the center pane, right-click the Custom Actions explorer, point to New EXE, and click Path referencing a directory. InstallShield adds a new custom action. |
|
c.
|
Configure the custom action’s settings in the right pane as follows: |
|
•
|
Working Directory: INSTALLDIR |
|
•
|
Filename & Command Line: [INSTALLDIR]odbc_install.exe |
|
•
|
In-Script Execution: Deferred Execution in System Context |
|
•
|
Install Exec Sequence: After InstallODBC |
|
•
|
Install Exec Condition: Not Installed |
|
8.
|
Add a custom action that uninstalls the ODBC Instant Client when end users uninstall the Instant Client: |
|
a.
|
In the View List under Behavior and Logic, click Custom Actions and Sequences. |
|
b.
|
In the center pane, right-click the Custom Actions explorer, point to New EXE, and click Path referencing a directory. InstallShield adds a new custom action. |
|
c.
|
Configure the custom action’s settings in the right pane as follows: |
|
•
|
Working Directory: INSTALLDIR |
|
•
|
Filename & Command Line: [INSTALLDIR]odbc_uninstall.exe |
|
•
|
In-Script Execution: Deferred Execution in System Context |
|
•
|
Install Exec Sequence: After RemoveODBC |
|
•
|
Install Exec Condition: REMOVE="ALL" |
|
9.
|
Specify a name for the .msi package file: |
|
a.
|
In the View List under Media, click Releases. |
|
b.
|
In the center pane, in the Releases explorer, click the product configuration called Product Configuration 1. |
|
c.
|
In the MSI Package File Name setting, enter the following name: |
Oracle11g Instant Client - ODBC 11.1
InstallShield will use the name that you enter for the .msi package that it creates for the Basic Instant Client and ODBC Instant Client. This is the file that will be launched by the InstallShield prerequisite that you create.
|
10.
|
On the toolbar, click the Build button. |
InstallShield builds an Oracle .msi file and adds it to the following directory so that you can include the Oracle11g Instant Client - ODBC 11.1.msi file in your InstallShield projects:
InstallShield Program Files Folder\SetupPrerequisites\oracle
To create an InstallShield prerequisite that launches the .msi package that you created in the aforementioned procedure:
|
1.
|
Make a copy of the existing InstallShield prerequisite (.prq) for the Oracle11g Instant Client. The path for the prerequisite is as follows: |
InstallShield Program Files Folder\SetupPrerequisites\Oracle11g Instant Client 11.1.0.7.prq
Name the copy Oracle11g Instant Client - ODBC 11.1.0.7.prq, and put it in the same directory as the original .prq file. The path for this new file is:
InstallShield Program Files Folder\SetupPrerequisites\Oracle11g Instant Client - ODBC 11.1.0.7.prq
|
2.
|
On the Tools menu, click Prerequisite Editor. The InstallShield Prerequisite Editor opens. |
|
3.
|
On the File menu, click Open. The Open dialog box opens. |
|
4.
|
Browse to the new Oracle11g Instant Client - ODBC 11.1.0.7.prq file, and then click the Open button. |
|
5.
|
On the Properties tab, in the Unique identifier for InstallShield prerequisite setting, enter: |
Oracle11g Instant Client – ODBC 11.1.0.7
If you are using a different version, update the identifier accordingly.
|
6.
|
Configure the conditions for the InstallShield prerequisite: |
|
a.
|
Click the Conditions tab. |
|
b.
|
Click each existing condition and then click the Remove button. |
|
c.
|
Click the Add button. The Prerequisite Condition dialog box opens. |
|
d.
|
Select the A registry key does or does not exist option. |
|
e.
|
In the Specify the registry key name to check setting, enter: |
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Oracle in instantclient11_1
If you are using a different version, configure the condition accordingly.
|
f.
|
Select the 32-bit option. |
|
g.
|
Select the If the specified registry key DOES NOT EXIST option, and then click OK. |
|
7.
|
Specify the appropriate .msi file to include in your InstallShield prerequisite: |
|
a.
|
Click the Files to Include tab. |
|
b.
|
Select the existing Oracle11g Instant Client 11.1.msi file, and then click the Modify button. The New File dialog box opens. |
|
c.
|
Select the Oracle11g Instant Client - ODBC 11.1.msi file that you built in the aforementioned procedure, and then click OK. |
|
8.
|
Specify the file that the InstallShield prerequisite should launch: |
|
a.
|
Click the Application to Run tab. |
|
b.
|
In the Specify the application you wish to launch setting, select the .msi file. |
|
9.
|
On the File menu, click Save. |
For instructions on how to add the Oracle 11g Instant Client and the ODBC Instant Client to installations, see Installing the Oracle 11g Instant Client.
If you plan on using the Oracle ODBC Instant Client instead of Microsoft ODBC for Oracle, ensure that you configure your project accordingly. For more information, see Running SQL Scripts with Unicode Characters on an Oracle Database Server.
See Also
Modifying an Existing InstallShield Prerequisite
Setting Installation Conditions for an InstallShield Prerequisite