User Guide
462
OLE Automation Function Reference
AddFeature
Adds a feature to the installation. Allows for the specification of all aspects of a feature
in Windows Installer.
AddFile
Adds a file to the installation. The file can be added either to a feature or a component
as specified by the iType parameter. Both the source and destination paths include the
file name. This lets you rename a file in an installation by specifying a different
destination file name.
Function
Prototype
BOOL AddFeature(BSTR szFeature, BSTR szParent, BSTR szTitle, BSTR szDescription, short
iDisplay, short iLevel, BSTR szDirectory, short iAttributes)
Parameters szFeature: new feature name
szParent: parent feature or "" if root feature
szTitle: title of feature
szDescription: description of feature
iDisplay: order in which and how feature is to be displayed in the user interface:
0 for not displayed
odd values for open initially
even values for collapsed initially
iLevel: install level; 0 disables the item.
Install level usually set by typical install or custom action; IDE creates features with iLevel
of 3.
szDirectory: key to directory table or destination directory path that can be configured for
the feature
iAttributes: ORed values of the following:
1 favor source install
2 favor parent attributes
4 favor advertised feature
8 disallow advertising
16 disallow option to set absent
32 disallow advertising if the operating system does not allow it
Default value created from user interface is 0
Return Value Nonzero if successful