This is commonly need functionality, and it surprises me that InstallShield has ignored this problem. I brought up this issue in the training classes and I hope it was returned to the developers.
This is one of the many of problems I have encountered with ISWI 2.1. Here is my solution.
1st
Create a Property to store your file information in. If you need to pass a command line you should use a property for that also.
Properties : CP_INSTALL_FILE
CP_INSTALL_FILE_COMMAND
2nd
Create an Install Script file. In this file you will set your properties. Here is an example for SQL Server silent install,
#include "isrt.h"
#include "iswi.h"
export prototype SetDir(HWND);
function SetDir(hMSI)
STRING svName, svSQL_Location, svSQL_SP3_Location, svCommandLine;
NUMBER nvSize, nResponse;
begin
// Get the source directory
nvSize = 256;
MsiGetProperty (hMSI, "SOURCEDIR", svName, nvSize);
//Add the installation file information we need
svSQL_Location = svName + "X86\\Setup\\SETUPSQL.exe";
svCommandLine = "-f1 " + svName + "X86\\Setup\\setup.iss" + " -SMS -s";
// Set our Property
MsiSetProperty(hMSI, " CP_INSTALL_FILE ", svSQL_Location);
MsiSetProperty(hMSI, " CP_INSTALL_FILE_COMMAND ", svCommandLine);
end;
3rd
Create a custom that runs your install script.
4th
Create a custom action that launches an executable using the Properties you added.
5th
Insert these custom actions into your sequence