This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Pass multiple features to SdFeature() using szFeatures
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 22, 2009
08:36 AM
Pass multiple features to SdFeature() using szFeatures
I would like to pass more than one feature to SdFeature() using the szFeature string parameter. What is the syntax to accomplish this?
Project Type: InstallScript Project
Failed Code:
Project Type: InstallScript Project
Failed Code:
//Used comma seperated feature names
szFeatures = "Data\\Deploy Data Pkgs, Application";
SdFeatureTree("TCMS v3.2 Repair", "Please select the features to repaire.","C:\\", szFeatures, 3);
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 22, 2009
02:06 PM
The szFeatures parameter to SdFeatureTree is designed to except an empty string ("") or the name of a top-level feature to be displayed (including its subfeatures). Multiple features cannot be passed to this parameter.
Was there something specific you were trying to accomplish by passing multiple features in this parameter?
Was there something specific you were trying to accomplish by passing multiple features in this parameter?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 22, 2009
03:27 PM
Yes, I have the following feature and sub-feature structure in my Installscript Project:
-------------------------------------
Feature1
Feature2 (has msm package)
Feature3
Feature4
-------------------------------------------
I would like to select only feature 3 and feature 4 during a repair install. However features 1 and 2 also run when i attempt this. My code is below.
:confused:
-------------------------------------
Feature1
Feature1a
Feature1ab (has SQL Scripts)
Feature1ac (has SQL Scripts)
Feature1b
Feature2 (has msm package)
Feature3
Feature3a (no files, just event scripting)
...
Feature3e (no files, just event scripting)
Feature4
Feature4a
...
Feature4g
-------------------------------------------
I would like to select only feature 3 and feature 4 during a repair install. However features 1 and 2 also run when i attempt this. My code is below.
:confused:
case REPAIR:
// Changed for DevStudio 9, Disk1 files are now always updated when installed
// so when running from ADDREMOVE we need to prevent these files from being
// updated since this will result in files being updated that are locked by the setup.
// Updating these files when running from ADDREMOVE should not be needed since updates
// are not run directly from Add/Remove.
Log_WriteLine("Repair has begin");
if( ADDREMOVE ) then
// Reinstall all previously installed features, except
// disk1 features.
FeatureUpdate( "" );
else
// Install selected features.
//FeatureSelectItem(MEDIA, szFeature,
Log_WriteLine("Repair is not Add Remove. Finding the TCMS Instal Folder...");
if Reg_GetTCMInstallFolders(svAppDir, svDataDir) = 0 then
Log_WriteLine("Calling SDFeatureTree ");
//Remove Additional
FeatureSetData (MEDIA, "Networthiness", FEATURE_FIELD_VISIBLE, FALSE, szTemp);
FeatureSetData (MEDIA, "ProjectConversion", FEATURE_FIELD_VISIBLE, FALSE, szTemp);
FeatureSetData (MEDIA, "SQLSMO", FEATURE_FIELD_VISIBLE, FALSE, szTemp);
//Remove Applications
FeatureSetData (MEDIA, "Application\\DevExperience", FEATURE_FIELD_VISIBLE, FALSE, szTemp);
FeatureSetData (MEDIA, "Application\\StrataFrame", FEATURE_FIELD_VISIBLE, FALSE, szTemp);
FeatureSetData (MEDIA, "Application\\AddIns", FEATURE_FIELD_VISIBLE, FALSE, szTemp);
FeatureSetData (MEDIA, "Application\\SpellChecker", FEATURE_FIELD_VISIBLE, FALSE, szTemp);
FeatureSetData (MEDIA, "Application\\DynaZip", FEATURE_FIELD_VISIBLE, FALSE, szTemp);
FeatureSetData (MEDIA, "Application\\Documents", FEATURE_FIELD_VISIBLE, FALSE, szTemp);
FeatureSetData (MEDIA, "Application\\TCMSCore", FEATURE_FIELD_VISIBLE, FALSE, szTemp);
SdFeatureTree("TCMS v3.2 Repair", "Please select the features to repaire.","C:\\", "", 3);
FeatureMoveData(MEDIA, nvDisk, 0 );
else
Log_WriteLine("Repair Install Aborted: Could not find the install locations for the application and data.");
abort;
endif;
endif;
// Added in 11.0 - Set appropriate StatusEx static text.
SetStatusExStaticText( SdLoadString( IDS_IFX_STATUSEX_STATICTEXT_MAINTUI_REPAIR ) );
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2009
08:16 AM
I figured it out. I had to unselect the feature as well as remove the feature using featuresetdata().
//Remove Features
FeatureSetData (MEDIA, "ProjectConversion", FEATURE_FIELD_VISIBLE, FALSE, szTemp);
FeatureSetData (MEDIA, "SQLSMO", FEATURE_FIELD_VISIBLE, FALSE, szTemp);
FeatureSetData (MEDIA, "SQLSMO\\SQLSMO Install", FEATURE_FIELD_VISIBLE, FALSE, szTemp);
//Un-Select Features
FeatureSetData (MEDIA, "ProjectConversion", FEATURE_FIELD_SELECTED, FALSE, szTemp);
FeatureSetData (MEDIA, "SQLSMO", FEATURE_FIELD_SELECTED, FALSE, szTemp);
FeatureSetData (MEDIA, "SQLSMO\\SQLSMO Install", FEATURE_FIELD_SELECTED, FALSE, szTemp);
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)