PDA

View Full Version : Need to set INCLUDEINBUILD=Yes for required Features in runtime



vattipalli
12-31-2004, 02:12 AM
Hi,
I need to set INCLUDEINBUILD=Yes for required Features in runtime. Please let me know how to do this.

metalix
01-04-2005, 03:17 AM
Hi,
The "Include In Build" property has to be set before you build your installation, so it cannot be changed at runtime.
If you want to have a specific Feature installed or not, you can use the FeatureSelectItem(..) function.

What you can do is write an independant program to build your project, and in this program set conditions to include\exclude Features before building.
The code for this (in C#) is:

~ ConditionalStatement - the condition for inclusion\exclusion
~ strFeatureName - a string with the name of the Feature in question
~ boolVariable - true\false

....
ISProj = new ISWiAuto10.ISWiProject();
string strFile = ProjFullPath;
ISProj.OpenProject(strFile, false);
....
if ( ConditionalStatement )
{
ISWiFeature ProjectFeature = FindFeature(ISProj, strFeatureName);
ProjectFeature.IncludeInBuild = boolVariable;
}
....
Hope this help,

Meny.

vattipalli
01-04-2005, 03:42 AM
Hi,
Thanks for your reply.. Thanks for giving the code in C. Can i have that external program in new InstallShield project instead of C# or VB. If yes,
what would be the code in setup.rul file,please let me know.
Regards,
Ramana Kumar.

vattipalli
01-04-2005, 03:43 AM
Hi,

Thanks for your reply.. Thanks for giving the code in C. Can i have that external program in new InstallShield project instead of C# or VB. If yes,
what would be the code in setup.rul file,please let me know.

Regards,
vattipalli.

metalix
01-05-2005, 07:05 AM
Hi,
Building the InstallShield project is only a small part of the external program, and the code I posted is just about all there is regarding this.

Sorry,

Meny.