MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: /Extn[Next]: Feature?
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Source Code->Commands->Feature

The "Feature" Command

This command has two distinct purposes, it creates or updates a Windows Installer feature or makes a feature the default for other commands.

The command can be nested and a block must be terminated with "/Feature". Any other MAKEMSI commands that have a "feature" parameter will use the "current" component details by default.

Splitting your MSI into multiple features is a mechanism for giving users choice at install time as features can be optionally installed. For example the MAKEMSI install has many optional features as you see if you selected the "custom" button.

Another reason for creating multiple features is that each feature can be installed into its own separate directory tree with the user being able to control the location of both these trees.

The macro takes these parameters:

Note that most MAKEMSI commands validate the names of all parameters supplied. As this command doesn't you need to be particularly careful to get them right...

EXAMPLES

;--- Create Feature (a number of items defaulting) --------------------------
<$Feature "F_Dennis" Title=^Dennis' "Feature"^ Attributes="3+4+5">
   ;--- Create Component (assign to feature) --------------------------------
   <$Component "C_Dennis" Directory_="WindowsFolder">
       ;--- Do stuff --------------------------------------------------------
       ;...
   <$/Component>

   ;--- Create SUB-Feature --------------------------------------------------
   <$Feature "F_Under_Dennis" CREATE="Y">  ;;CREATE="Y" REQUIRED here as no attributes supplied
       <$Component "C_Under_Dennis" ComponentId="" Directory_="WindowsFolder">
           ;--- Do stuff ----------------------------------------------------
           ;...
       <$/Component>
   <$/Feature>
<$/Feature>


;--- Update feature ---------------------------------------------------------
<$Feature "F_Dennis" Level="99" CREATE="N"><$/Feature>

;--- Reference existing feature ---------------------------------------------
<$Feature "Fred">
   'Just a reference (becomes default feature)
<$/Feature>


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: /Extn[Next]: Feature?


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday August 13 2017 at 2:39pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.