<msi>

[This is preliminary documentation and subject to change.]

Creates a Windows Installer (also known as Microsoft Installer, or MSI) setup database for installing software on the Windows Platform.

Requires cabarc.exe in the path. This tool is part of the Microsoft Cabinet SDK.

Requires mergemod.dll version 2.0 or greater. This dll is part of the Microsoft Platform SDK.

See the Roadmap to Windows Installer Documentation at Microsoft's MSDN website for more information.

Parameters

Attribute Type Description Required
background string A .bmp (bitmap) file 495x315 pixels in size that will be displayed as the background image of the installation user interface. False
banner string A .bmp (bitmap) file 495x60 pixels in size that will be displayed as the banner (top) image of the installation user interface. False
license string An .rtf (rich text format) file containing the license agreement for your software. The contents of this file will be displayed to the user when setup runs and must be accepted to continue. False
output string The name of the file that will be generated when the task completes execution (eg. MyInstall.msi or MyMergeModule.msm). True
sourcedir string A directory relative to the NAnt script in which the msi task resides from which to retrieve files that will be installed by the msi database. All files that will be included in your installation need to be located directly within or in subdirectories of this directory. True
debug bool Causes the generated msi database file to contain debug messages for errors created by inconsistencies in creation of the database. This makes the file slightly larger and should be avoided when generating a production release of your software. False
errortemplate string A .mst file to use as the starting database containing strings displayed to the user when errors occur during installation. A .mst template is included with the msi task, you only need to supply this value if you want to override the default error template and cannot perform something through the features of the msi task. False
failonerror bool Determines if task failure stops the build, or is just reported. The default is true. False
if bool If true then the task will be executed; otherwise, skipped. The default is true. False
template string A installer file to use as the starting database in which all files and entries will be made, and then copied to the filename specified by the output parameter. Install templates are included with the install tasks, you only need to supply this value if you want to override the default template. False
unless bool Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. False
verbose bool Determines whether the task should report detailed build log messages. The default is false. False

Nested Elements:

<features>

Groups sets of components into named sets, these can be used to layout the tree control that allows users to select and deselect features of your software product when a custom installation is selected at runtime.

Parameters

Attribute Type Description Required
name string A name used to refer to the feature. True
display int The number in this field specifies the order in which the feature is to be displayed in the user interface. The value also determines if the feature is initially displayed expanded or collapsed.

If the value is null or zero, the record is not displayed. If the value is odd, the feature node is expanded initially. If the value is even, the feature node is collapsed initially.
True
title string Short string of text identifying the feature. This string is listed as an item by the SelectionTree control of the Selection Dialog. False
typical bool Determines if the feature should be included in a "typical" install. This is useful for when the user selects to just install the typical features. False
directory string Refrence to a directory. Specify a corresponding directory to go with the feature. False
attr int Any combination of the following:
ValueDescription
0Components of this feature that are not marked for installation from source are installed locally.
1Components of this feature not marked for local installation are installed to run from the source CD-ROM or server.
2Set this attribute and the state of the feature is the same as the state of the feature's parent.
4Set this attribute and the feature state is Advertise.
8Note that this bit works only with features that are listed by the ADVERTISE property.

Set this attribute to prevent the feature from being advertised.
16Set this attribute and the user interface does not display an option to change the feature state to Absent. Setting this attribute forces the feature to the installation state, whether or not the feature is visible in the UI.
32Set this attribute and advertising is disabled for the feature if the operating system shell does not support Windows Installer descriptors.
More information found here: http://msdn.microsoft.com/library/en-us/msi/setup/feature_table.asp
False

Nested Elements:

<feature>

</feature>

<description>

</description>

<conditions>

</conditions>

Examples

  • Define a sample features structure.

    <features>
        <feature name="F__Default" title="My Product" display="1" typical="true" directory="TARGETDIR">
            <description>My Product from ACME, Inc. </description>
            <feature name="F__MainFiles" display="0" typical="true" />
        </feature>
        <feature name="F__Help" title="My Product Help Files" display="1" typical="false" directory="D__ACME_MyProduct_Help" />
    </features> 
        
  • Represents the an element based on a schema definition.

    </features>

    <mergemodules>

    Includes pre-packaged installation components (.msm files) as part of the msi database. This feature allows reuse of installation components that use MSI technology from other setup vendors or as created by the <msm> task.

    Parameters

    Attribute Type Description Required
    feature string Refrence to a feature. Used to associate the merge module with the feature (and the feature's directory) for when to install the components in the merge module. True

    Nested Elements:

    <modules>

    </modules>

    <configurationitems>

    </configurationitems>

    Examples

  • Add the NAnt merge module to the install.

    <mergemodules>
        <merge feature="F__NAntMSM">
            <modules>
                <include name="${nant.dir}\Install\NAnt.msm" />
            </modules>
        </merge>
    </mergemodules>
        
  • Add a Visual Studio .wid package (merge module) and specify some configurable items.

    <mergemodules>
      <merge feature="F__DefaultFeature">
        <modules>
          <include name="VsdReadmeDlg.wid" />
        </modules>
        <configurationitems>
          <configurationitem name="BannerBitmap" value="CONFIGURED_BANNERBITMAP" />
          <configurationitem module="VsdReadmeDlg.wid" name="ReadmeText" value="CONFIGURED_READMETEXT" />
        </configurationitems>
      </merge>
    </mergemodules>
        
  • Represents the an element based on a schema definition.

    </mergemodules>

    <summaryinformation>

    Sets various properties in the SummaryInformation stream (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/summary_information_stream.asp)

    All of the sub-elements are optional.

    Nested Elements:

    <title>

    </title>

    <subject>

    </subject>

    <author>

    </author>

    <keywords>

    </keywords>

    <comments>

    </comments>

    <template>

    </template>

    <revisionnumber>

    </revisionnumber>

    <creatingapplication>

    </creatingapplication>

    Examples

  • Define specific summary information.

    <summaryinformation>
        <title>Installation Database</title>
        <subject>${install.productname}</subject>
        <author>${install.manufacturer}</author>
        <keywords>MSI, database, NAnt, Installer</keywords>
        <comments>This installer database contains the logic and data required to install NAnt</comments>
        <template>;1033</template>
        <creatingapplication>NAnt - http://nant.sf.net </creatingapplication>
    </summaryinformation> 
        
  • Represents the an element based on a schema definition.

    </summaryinformation>

    <properties>

    Name/value pairs which will be set in the PROPERTY table of the installer database.

    The properties element contains within it one to any number of property elements.

    Public property names cannot contain lowercase letters.

    Private property names must contain some lowercase letters.

    Property names prefixed with % represent system and user environment variables. These are never entered into the Property table. The permanent settings of environment variables can only be modified using the Environment Table. More information is available here.

    Parameters

    Attribute Type Description Required
    name string A name used to refer to the property. True
    value string The value of the property. This value can contain references to other, predefined properties to build a compound property. True

    Examples

  • Define the required properties.

    <properties>
        <property name="ProductName" value="My Product" />
        <property name="ProductVersion" value="1.0.0" />
        <property name="Manufacturer" value="ACME Inc." />
        <property name="ProductCode" value="{29D8F096-3371-4cba-87E1-A8C6511F7B4C}" />
        <property name="UpgradeCode" value="{69E66919-0DE1-4280-B4C1-94049F76BA1A}" />
    </properties> 
        
  • Represents the an element based on a schema definition.

    </properties>

    <search>

    Contains within it one to any number of app, registry, ini, or dirfile elements. These elements are used to search for an existing filesystem directory, file, or Windows Registry setting. A property in the installer database is then set with the value obtained from the search.

    <app>

    More information on these attributes can be found at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/complocator_table.asp

    Attribute Type Description Required
    componentid string The component ID of the component whose key path is to be used for the search. True
    type msi:MSILocatorTypeDirFile Valid input: file or directory True
    setproperty string A name used to refer to the property within the Msi database. Set at install time. True

    </app>

    <registry>

    More information on these attributes can be found at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/reglocator_table.asp

    Attribute Type Description Required
    type msi:MSILocatorTypeDirFileReg64 Valid input: registry, file, directory, 64bit True
    path string Depending on the type specified:
    • Path is a directory.
    • Path is a registry key.
    True
    root msi:MSIRegistryKeyRoot Valid input:
    • dependent - If this is a per-user installation, the registry value is written under HKEY_CURRENT_USER. If this is a per-machine installation, the registry value is written under HKEY_LOCAL_MACHINE. Note that a per-machine installation is specified by setting the ALLUSERS property to 1.
    • machine represents HKEY_LOCAL_MACHINE
    • classes represents HKEY_CLASSES_ROOT
    • user represents HKEY_CURRENT_USER
    • users represents HKEY_USERS
    True

    </registry>

    <ini>

    More information on these attributes can be found at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/inilocator_table.asp

    Attribute Type Description Required
    filename string The .ini file name. (The .ini file must be present in the default Microsoft Windows directory.) True
    section string Section name within the .ini file. True
    key string Key value within the section. True
    field msi:nonNegativeInt The field in the .ini line. If Field is Null or 0, then the entire line is read. This must be a non-negative number. False
    type msi:MSILocatorTypeDirFileRaw Valid input: file ,directory, or raw True
    setproperty string A name used to refer to the property within the Msi database. Set at install time. True

    </ini>

    <dirfile>

    More information on these attributes can be found at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/drlocator_table.asp and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/signature_table.asp

    Attribute Type Description Required
    parent string An identifier to RegLocator, IniLocator, or CompLocator tables. If it does not expand to a full path, then all the fixed drives of the user's system are searched by using the Path.

    In order to determine what the key is for a table, prefix the property name assigned to that locator with SIG_
    False
    path string the path on the user's system. This is a either a full path or a relative subpath below the directory specified in the Parent column. False
    depth msi:nonNegativeInt The depth below the path that the installer searches for the file or directory. False
    setproperty string A name used to refer to the property within the Msi database. Set at install time. True

    </dirfile>

    Examples

  • Get the path of the web directory and the version of IIS. Create new properties in the Msi file with those values.

    <search>
        <registry type="registry" path="Software\Microsoft\InetStp" root="machine" >
            <value name="PathWWWRoot" setproperty="IISWWWROOT" />
        </registry>
        <registry type="registry" path="SYSTEM\CurrentControlSet\Services\W3SVC\Parameters" root="machine" >
                <value name="MajorVersion" setproperty="IISVERSION" />
        </registry>
    </search> 
        
  • Shows two ways to get the default key value for the specified key. Create new properties in the Msi file with those values.

    <search>
        <registry type="registry" path="Software\Microsoft\MessengerService" root="machine" >
            <value setproperty="MSGSRVNAME" />
            <value name="" setproperty="MSGSRVNAME2" />
        </registry>
    </search> 
        
  • Represents the an element based on a schema definition.

    </search>

    <launchconditions>

    Contains within it one to any number of launchcondition elements. Launch conditions are conditions that all must be satisfied for the installation to begin.

    Parameters

    Attribute Type Description Required
    name string A name used to identify the launch condition. True
    condition string Expression that must evaluate to True for installation to begin. True

    Nested Elements:

    <description>

    </description>

    Examples

  • Create a check to make sure that IIS 5.x is installed.

    <launchconditions>
        <launchcondition name="CheckIIS" condition="(IISVERSION = &quot;#5&quot;)" >
            <description>
                This setup requires Internet information Server 5.x.  Please install Internet Information Server and run this setup again.
            </description>
        </launchcondition>
    </launchconditions>
        
  • Represents the an element based on a schema definition.

    </launchconditions>

    <tables>

    Creates custom tables not directly managed by default features of the installer task.

    Parameters

    Attribute Type Description Required
    name string A unique name used to identify the table. True

    Nested Elements:

    <columns>

    </columns>

    <rows>

    </rows>

    Examples

  • Build the IniFile table. Since the WriteIniValues and RemoveIniValues actions exist in the template, they will use this table.

    <tables>
        <table name="IniFile">
            <columns>
                <column name="IniFile" nullable="false" category="Identifier" key="true" description="The key for this table." />
                <column name="FileName" nullable="false" category="Text" description="The localizable name of the .ini file in which to write the information. " />
                <column name="DirProperty" nullable="true" category="Identifier" description="Name of a property having a value that resolves to the full path of the folder containing the .ini file. " /> 
                <column name="Section" nullable="false" category="Formatted" description="The localizable .ini file section." />
                <column name="Key" nullable="false" category="Formatted" description="The localizable .ini file key within the section" />
                <column name="Value" nullable="false" category="Formatted" description="The localizable value to be written. " />
                <column name="Action" nullable="false" category="Integer" description="The type of modification to be made. " />
                <column name="Component_" nullable="false" category="Identifier" description="External key into the first column of the Component table referencing the component that controls the installation of the .ini value. " />
            </columns>
            <rows>
                <row>
                    <columns>
                        <column name="IniFile" value="MyInternetShortcut" />
                        <column name="FileName" value="MyInternetAddr.url" />
                        <column name="DirProperty" value="D__MYDIR" />
                        <column name="Section" value="InternetShortcut" />
                        <column name="Key" value="URL" />
                        <column name="Value" value="[TARGETURL]" />
                        <column name="Action" value="0" />
                        <column name="Component_" value="C__Documentation" />
                    </columns>
                </row>
            </rows>
        </table>
    </tables>
        
  • Represents the an element based on a schema definition.

    </tables>

    <directories>

    Specifies the directory layout for the product.

    Parameters

    Attribute Type Description Required
    name string A name used to refer to the directory. True
    foldername string The directory's name (localizable)under the parent directory. True
    root string A reference to the directory's parent directory. This can be a property name or one of the predefined directories included with the default template:
    • AdminToolsFolder
    • AppDataFolder
    • CommonAppDataFolder
    • CommonFiles64Folder
    • CommonFilesFolder
    • DesktopFolder
    • FavoritesFolder
    • FontsFolder
    • LocalAppDataFolder
    • MyPicturesFolder
    • PersonalFolder
    • ProgramFilesFolder
    • ProgramMenuFolder
    • ProgramFiles64Folder
    • SendToFolder
    • StartMenuFolder
    • StartupFolder
    • System16Folder
    • System64Folder
    • SystemFolder
    • TARGETDIR
    • TempFolder
    • TemplateFolder
    • WindowsFolder
    • WindowsVolume
    True

    Nested Elements:

    <directory>

    </directory>

    Examples

  • Define a sample directory structure.

    <directories>
        <directory name="D__ACME" foldername="ACME" root="TARGETDIR" >
            <directory name="D__ACME_MyProduct" foldername="My Product" />
        </directory>
    </directories> 
        
  • Represents the an element based on a schema definition.

    </directories>

    <environment>

    Used to modify the environment variables of the target computer at runtime.

    Parameters

    Attribute Type Description Required
    name string The localizable name of the environment variable. The key values are written or removed depending upon which of the characters in the following table are prefixed to the name. There is no effect in the ordering of the symbols used in a prefix.
    PrefixDescription
    =Create the environment variable if it does not exist, and then set it during installation. If the environment variable exists, set it during the installation.
    +Create the environment variable if it does not exist, then set it during installation. This has no effect on the value of the environment variable if it already exists.
    -Remove the environment variable when the component is removed. This symbol can be combined with any prefix.
    !Remove the environment variable during an installation. The installer only removes an environment variable during an installation if the name and value of the variable match the entries in the Name and Value fields of the Environment table. If you want to remove an environment variable, regardless of its value, use the '!' syntax, and leave the Value field empty.
    *This prefix is used with Microsoft® Windows® NT/Windows® 2000 to indicate that the name refers to a system environment variable. If no asterisk is present, the installer writes the variable to the user's environment. Microsoft Windows 95/98 ignores the asterisk and add the environment variable to autoexec.bat. This symbol can be combined with any prefix. A package that is used for per-machine installations should write environment variables to the machine's environment by including * in the Name column. For more information, see http://msdn.microsoft.com/library/en-us/msi/setup/environment_table.asp
    =-The environment variable is set on install and removed on uninstall. This is the usual behavior.
    !-Removes an environment variable during an install or uninstall.
    More information can be found here: http://msdn.microsoft.com/library/en-us/msi/setup/environment_table.asp
    True
    append string Localizable value that is to be set as a formatted string True
    component string Refrence to a component. Allows the variabled to be modified when the component is un/installed. True

    Examples

  • Append the installation path to the user PATH variable.

    <environment>
        <variable name="PATH" append="'[TARGETDIR]'" component="C__MainFiles" />
    </environment>
        
  • Represents the an element based on a schema definition.

    </environment>

    <components>

    Groups sets of files into named sets, these can be used to install and perform operations on a set of files as one entity.

    Parameters

    Attribute Type Description Required
    name string A name used to refer to the component. True
    id string A string GUID unique to this component, version, and language.

    Note that the letters of these GUIDs must be uppercase. Utilities such as GUIDGEN can generate GUIDs containing lowercase letters. The lowercase letters must be changed to uppercase to make these valid component code GUIDs.
    True
    attr int This column contains a bit flag that specifies options for remote execution. Add the indicated bit to the total value in the column to include an option.
    ValueDescription
    0Component cannot be run from source.

    Set this bit for all components belonging to a feature to prevent the feature from being run-from-network or run-from-source. Note that if a feature has no components, the feature always shows run-from-source and run-from-my-computer as valid options.
    1Component can only be run from source.

    Set this bit for all components belonging to a feature to prevent the feature from being run-from-my-computer. Note that if a feature has no components, the feature always shows run-from-source and run-from-my-computer as valid options.
    2Component can run locally or from source.
    4If this bit is set, the value in the key element is used as a key into the Registry table.

    If the Value field of the corresponding record in the Registry table is null, the Name field in that record must not contain "+", "-", or "*". For more information, see the description of the Name field in Registry table.

    Setting this bit is recommended for registry entries written to the HKCU hive. This ensures the installer writes the necessary HKCU registry entries when there are multiple users on the same machine.
    16If this bit is set, the installer does not remove the component during an uninstall. The installer registers an extra system client for the component in the Windows Installer registry settings.
    32If this bit is set, the value in the KeyPath column is a key into the ODBCDataSource table.
    64If this bit is set, the installer reevaluates the value of the statement in the Condition column upon a reinstall. If the value was previously False and has changed to True, the installer installs the component. If the value was previously True and has changed to False, the installer removes the component even if the component has other products as clients.

    This bit should only be set for transitive components. See Using Transitive Components.
    128If this bit is set, the installer does not install or reinstall the component if a key path file or a key path registry entry for the component already exists. The application does register itself as a client of the component.

    Use this flag only for components that are being registered by the Registry table.
    256Set this bit to mark this as a 64-bit component. This attribute facilitates the installation of packages that include both 32-bit and 64-bit components. If this bit is not set, the component is registered as a 32-bit component.
    True
    directory string Refrence to a directory. Defines the directory location for where the files assigned to the component are to be placed. True
    feature string Refrence to a feature. Maps a feature to the component. Used to determine if the component is to be installed or not. True
    condition string A conditional statement that can control whether a component is installed. If the condition is null or evaluates to true, then the component is enabled. If the condition evaluates to False, then the component is disabled and is not installed. False
    fileattr int Integer containing bit flags representing file attributes.

    The following table shows the definition of the bit field.
    ValueDescription
    1Read-Only
    2Hidden
    4System
    512The file is vital for the proper operation of the component to which it belongs
    1024The file contains a valid checksum. A checksum is required to repair a file that has become corrupted.
    4096This bit must only be added by a patch and if the file is being added by the patch.
    8192The file's source type is uncompressed. If set, ignore the Word Count Summary Property. If neither msidbFileAttributesNoncompressed or msidbFileAttributesCompressed are set, the compression state of the file is specified by the Word Count Summary Property. Do not set both msidbFileAttributesNoncompressed and msidbFileAttributesCompressed.
    16384The file's source type is compressed. If set, ignore the Word Count Summary Property. If neither msidbFileAttributesNoncompressed or msidbFileAttributesCompressed are set, the compression state of the file is specified by the Word Count Summary Property. Do not set both msidbFileAttributesNoncompressed and msidbFileAttributesCompressed.
    False
    checkinterop bool Used to determine if file(s) in the fileset are interop file(s). If true, extra information will be added in the install package to register each interop file. If false, the file(s) will not be not be checked and the extra registration information will not be added to the msi. False
    installassembliestogac bool Used to determine if assemblies should be installed to the Global Assembly Cache. If true, all assemblies in the fileset will be added to the GAC. If false, the assemblies will be installed to the specified directory (as a normal file would). Note: If an assembly is specified to be installed into the GAC, it will not also be installed to the directory specified. False
    keepsubdirs bool Used to determine if directories in the fileset should be built. If true, all subdirectories of the fileset basedir will be built. If false the directories structure will be flattened. The default is false. False

    Nested Elements:

    <keyfile>

    </keyfile>

    <fileset>

    </fileset>

    <forceid>

    </forceid>

    Examples

  • Define a sample component structure.

    <components>
        <component name="C__MainFiles" id="{26AA7144-E683-441D-9843-3C79AEC1C636}" attr="2" directory="TARGETDIR" feature="F__MainFiles" >
            <key file="default.aspx" />
            <fileset basedir="${install.dir}">
                <include name="*.*" />
            </fileset>
        </component>
    </components> 
        
  • Install files to TARGETDIR and assemblies to the GAC (Global Assembly Cache). Do not install MyOtherAssembly.dll to the GAC, but rather install it with the other files (to TARGETDIR)

    <components>
        <component name="C__MainFiles" id="{26AA7144-E683-441D-9843-3C79AEC1C636}" attr="2" directory="TARGETDIR" feature="F__MainFiles" installassembliestogac="true" >
            <key file="MyAssemblyName.xml" />
            <fileset basedir="${install.dir}">
                <include name="*.*" />
            </fileset>
            <forceid file="MyOtherAssembly.dll" id="_4EB7CCB23D394958988ED817DA00B9D1" installtogac="false" />
        </component>
    </components> 
        
  • Assign a registry entry to a specific component.

    <components>
        <component name="C__RegistryEntry" id="{06C654AA-273D-4E39-885C-3E5225D9F336}" attr="4" directory="TARGETDIR" feature="F__DefaultFeature" >
            <key file="R__822EC365A8754FACBF6C713BFE4E57F0" />
        </component>
    </components> 
    .
    .
    .
    <registry>
        <key path="SOFTWARE\MyCompany\MyProduct\" root="machine" component="C__RegistryEntry">
             <value id="R__822EC365A8754FACBF6C713BFE4E57F0" name="MyKeyName" value="MyKeyValue" />
        </key>
    </registry>
        
  • Represents the an element based on a schema definition.

    </components>

    <dialogs>

    Creates custom dialogs that can gather information not handled by the default installer template.

    Parameters

    Attribute Type Description Required
    name string A name used to refer to the dialog. True
    hcenter int Horizontal position of the dialog box. The range is 0 to 100, with 0 at the left edge of the screen and 100 at the right edge. True
    vcenter int Vertical position of the dialog box. The range is 0 to 100, with 0 at the top edge of the screen and 100 at the bottom edge. True
    width int Width of the rectangular boundary of the dialog box. This number must be non-negative. True
    height int Height of the rectangular boundary of the dialog box. This number must be non-negative. True
    attr int A 32-bit word that specifies the attribute flags to be applied to this dialog box. This number must be non-negative.
    ValueDescription
    1Visible
    2Modal
    4Minimize
    8SysModal
    16KeepModeless
    32TrackDiskSpace
    64UseCustomPalette
    128RTLRO
    256RightAligned
    512LeftScroll
    896BiDi
    65536Error
    More information here: http://msdn.microsoft.com/library/en-us/msi/setup/dialog_style_bits.asp
    True
    title string A localizable text string specifying the title to be displayed in the title bar of the dialog box. True
    firstcontrol string An external key to the second column of the Control table. Combining this field with the Dialog field identifies a unique control in the Control table. This defines the control that takes the focus when the dialog box is created. This column is ignored in an Error dialog box.

    Because static text cannot take the focus, a Text control that describes an Edit, PathEdit, ListView, ComboBox or VolumeSelectCombo control must be made the first control in the dialog box to ensure compatibility with screen readers.
    True
    defaultcontrol string An external key to the second column of the Control table. Combining this field with the Dialog field results in a primary key into the Control table that defines the default control. Hitting the Return key is equivalent to clicking on the default control. If this column is left blank, then there is no default control. This column is ignored in the Error dialog box. True
    cancelcontrol string An external key to the second column of the Control table. Combining this field with the Dialog field results in a primary key of the Control table that defines the cancel control. Hitting the ESC key or clicking the Close button in the dialog box is equivalent to clicking on the cancel control. This column is ignored in an Error dialog box.

    The cancel control is hidden during rollback or the removal of backed up files. The protected UI handler hides the control upon receiving a INSTALLMESSAGE_COMMONDATA message.
    True

    Examples

  • Add a web folder dialog:

    <dialogs>
        <dialog name="WebFolderDlg" hcenter="50" vcenter="50" width="370" height="270" attr="39" title="[ProductName] [Setup]" firstcontrol="Next" defaultcontrol="Next" cancelcontrol="Cancel" />
    </dialogs>
        
  • Represents the an element based on a schema definition.

    </dialogs>

    <controls>

    Creates user interface controls displayed on custom dialogs.

    Parameters

    Attribute Type Description Required
    name string Name of the control. This name must be unique within a dialog box but can be repeated on different dialog boxes. True
    dialog string Refrence to a dialog. Used to associate the control with the dialog. True
    type string The type of the control.
    Control nameDescription
    BillboardDisplays billboards based on progress messages.
    BitmapDisplays a static picture of a bitmap.
    CheckBoxA two-state check box.
    ComboBoxA drop-down list with an edit field.
    DirectoryComboSelect all except the last segment of the path.
    DirectoryListDisplays folders below the main part of path.
    EditA regular edit field for any string or integer.
    GroupBoxDisplays a rectangle that groups other controls together.
    IconDisplays a static picture of an icon.
    LineDisplays a horizontal line.
    ListBoxA drop-down list without an edit field.
    ListViewDisplays a column of values with icons for selection.
    MaskedEditAn edit field with a mask in the text field.
    PathEditDisplays folder name or entire path in an edit field.
    ProgressBarBar graph that changes length as it receives progress messages.
    PushButtonDisplays a basic push button.
    RadioButtonGroupA group of radio buttons.
    ScrollableTextDisplays a long string of text.
    SelectionTreeDisplays information from the Feature table and enables the user to change their selection state.
    TextDisplays static text.
    VolumeCostListDisplays costing information on different volumes.
    VolumeSelectComboSelects volume from an alphabetical list.
    More information found here: http://msdn.microsoft.com/library/en-us/msi/setup/controls.asp
    True
    x int Horizontal coordinate of the upper-left corner of the rectangular boundary of the control. This must be a non-negative number. True
    y int Vertical coordinate of the upper-left corner of the rectangular boundary of the control. This must be a non-negative number. True
    width int Width of the rectangular boundary of the control. This must be a non-negative number. True
    height int Height of the rectangular boundary of the control. This must be a non-negative number. True
    attr int A 32-bit word that specifies the bit flags to be applied to this control. This must be a non-negative number, and the allowed values depend upon the type of control.For a list of all control attributes, and the value to enter in this field, see Control Attributes. True
    property string The name of a defined property to be linked to this control. Radio button, list box, and combo box values are tied into a group by being linked to the same property. This column is required for active controls and is ignored by static controls. False
    text string A localizable string used to set the initial text contained in a control. The string can also contain embedded properties. False
    nextcontrol string The name of another control on the same dialog box. If the focus in the dialog box is on the control in the Control column, hitting the tab key moves the focus to the control listed here. Therefore this is used to specify the tab order of the controls on the dialog box. The links between the controls must form a closed cycle. Some controls, such as static text controls, can be left out of the cycle. In that case, this field may be left blank. False
    help string Optional, localizable text strings that are used with the Help button. The string is divided into two parts by a separator character (|). The first part of the string is used as ToolTip text. This text is used by screen readers for controls that contain a picture. The second part of the string is reserved for future use. The separator character is required even if only one of the two kinds of text is present. False
    remove bool If true, the control is removed. If false, the control is added. False

    Examples

  • Remove the Browse button from the customize dialog and add controls for a web dialog

     <controls>
         <!-- Remove the Browse button from customize dialog -->
         <control dialog="CustomizeDlg" name="Browse" type="PushButton"
             x="304" y="200" width="56" height="17" attr="3" remove="true" />
         <control dialog="CustomizeDlg" name="Tree" type="SelectionTree"
             x="25" y="85" width="175" height="95" attr="7" remove="true" />
    
         <!-- Re add the tree control with the proper next control -->
         <control dialog="CustomizeDlg" name="Tree" type="SelectionTree"
             x="25" y="85" width="175" height="95" attr="7" 
             property="_BrowseProperty" text="Tree of selections" nextcontrol="Reset" />
    
         <!-- Adds the controls associated with the webfolder dialog -->
         <control dialog="WebFolderDlg" name="BannerBitmap" type="Bitmap" 
             x="0" y="0" width="374" height="44" attr="1" 
             text="[BannerBitmap]" nextcontrol="VDirLabel" />
         <control dialog="WebFolderDlg" name="Title" type="Text" 
             x="15" y="6" width="200" height="15" attr="196611" 
             text="[DlgTitleFont]Virtual Directory Information" />
         <control dialog="WebFolderDlg" name="Description" type="Text" 
             x="25" y="23" width="280" height="15" attr="196611" 
             text="Please enter your virtual directory and port information." />
         <control dialog="WebFolderDlg" name="BannerLine" type="Line" 
             x="0" y="44" width="374" height="0" attr="1" />
         <control dialog="WebFolderDlg" name="VDirLabel" type="Text" 
             x="18" y="73" width="348" height="15" attr="3" 
             text="&Virtual directory:" 
             nextcontrol="Edit_VDir" />            
         <control dialog="WebFolderDlg" name="Edit_VDir" type="Edit" 
             x="18" y="85" width="252" height="18" attr="7" 
             property="TARGETVDIR" 
             text="[TARGETVDIR]" 
             nextcontrol="PortLabel" />
         <control dialog="WebFolderDlg" name="PortLabel" type="Text" 
             x="18" y="110" width="348" height="15" attr="3" 
             text="&Port:" 
             nextcontrol="Edit_Port" />            
         <control dialog="WebFolderDlg" name="Edit_Port" type="Edit" 
             x="18" y="122" width="48" height="18" attr="7" 
             property="TARGETPORT" 
             text="[TARGETPORT]" 
             nextcontrol="Back" />
         <control dialog="WebFolderDlg" name="BottomLine" type="Line" 
             x="0" y="234" width="374" height="0" attr="1" />                
         <control dialog="WebFolderDlg" name="Back" type="PushButton" 
             x="180" y="243" width="56" height="17" attr="3" 
             text="[ButtonText_Back]" nextcontrol="Next" />
         <control dialog="WebFolderDlg" name="Next" type="PushButton" 
             x="236" y="243" width="56" height="17" attr="3" 
             text="[ButtonText_Next]" nextcontrol="Cancel" />
         <control dialog="WebFolderDlg" name="Cancel" type="PushButton" 
             x="304" y="243" width="56" height="17" attr="3" 
             text="[ButtonText_Cancel]" nextcontrol="BannerBitmap" />
     </controls>
         
  • Represents the an element based on a schema definition.

    </controls>

    <controlconditions>

    Used to validate and perform operations as the result of information entered by the user into controls on custom dialogs.

    Parameters

    Attribute Type Description Required
    dialog string Refrence to a dialog. Used to associate the control with the dialog. True
    control string Refrence to a control. Maps to a control for the specified dialog. True
    action string The action that is to be taken on the control. The possible actions are shown in the following table.
    ValueDescription
    DefaultSet control as the default.
    DisableDisable the control.
    EnableEnable the control.
    HideHide the control.
    ShowDisplay the control.
    True
    condition string A conditional statement that specifies under which conditions the action should be triggered. If this statement does not evaluate to TRUE, the action does not take place. If it is set to 1, the action is always applied. True
    remove bool If true, the control condition is removed. If false, the control condition is added. False

    Examples

  • Remove the control condition for the Browse button from the customize dialog and add control conditions for a web dialog

    <controlconditions>
        <!-- Remove control condition for Browse button on customizeDlg -->
        <controlcondition dialog="CustomizeDlg" control="Browse" action="Hide"
            condition="Installed" remove="true" />
        <!-- Add control conditions for the web folder dialog -->
        <controlcondition dialog="WebFolderDlg" control="Back" action="Disable"
            condition="ShowUserRegistrationDlg=""" />
        <controlcondition dialog="WebFolderDlg" control="Back" action="Enable"
            condition="ShowUserRegistrationDlg<>""" />
    </controlconditions>
        
  • Represents the an element based on a schema definition.

    </controlconditions>

    <controlevents>

    Used to route the flow of the installation process as the result of events raised by the user interacting with controls on dialogs.

    Parameters

    Attribute Type Description Required
    dialog string Refrence to a dialog. Used to associate the control with the dialog. True
    control string Refrence to a control. Maps to a control for the specified dialog. True
    name string An identifier that specifies the type of event that should take place when the user interacts with the control specified by Dialog_ and Control_. For a list of possible values see ControlEvent Overview.

    To set a property with a control, put [Property_Name] in this field and the new value in the argument field. Put { } into the argument field to enter the null value.
    True
    argument string A value used as a modifier when triggering a particular event. True
    condition string A conditional statement that determines whether the installer activates the event in the Event column. The installer triggers the event if the conditional statement in the Condition field evaluates to True. Therefore put a 1 in this column to ensure that the installer triggers the event. The installer does not trigger the event if the Condition field contains a statement that evaluates to False. The installer does not trigger an event with a blank in the Condition field unless no other events of the control evaluate to True. If none of the Condition fields for the control named in the Control_ field evaluate to True, the installer triggers the one event having a blank Condition field, and if more than one Condition field is blank it triggers the one event of these with the largest value in the Ordering field. False
    order int An integer used to order several events tied to the same control. This must be a non-negative number. False
    remove bool If true, the control condition is removed. If false, the control condition is added. False

    Examples

  • Remove the control events for the Browse button from the customize dialog and add events conditions for a web dialog

              
     <controlevents>
         <!-- Remove the old control events -->
         <controlevent dialog="UserRegistrationDlg" control="Next" name="NewDialog" 
             argument="SetupTypeDlg" condition="ProductID" remove="true" />
         <controlevent dialog="SetupTypeDlg" control="Back" name="NewDialog" 
             argument="LicenseAgreementDlg" condition="ShowUserRegistrationDlg <> 1" remove="true" />
         <controlevent dialog="SetupTypeDlg" control="Back" name="NewDialog" 
             argument="UserRegistrationDlg" condition="ShowUserRegistrationDlg = 1" remove="true" />
         <!-- Remove control events for Browse button on CustomizeDlg -->
         <controlevent dialog="CustomizeDlg" control="Browse" name="SelectionBrowse" 
             argument="BrowseDlg" condition="1" remove="true" />                
    
         <!-- Add new control events for the web dialog -->
         <controlevent dialog="UserRegistrationDlg" control="Next" name="NewDialog" 
             argument="WebFolderDlg" condition="ProductID" />                        
         <controlevent dialog="SetupTypeDlg" control="Back" name="NewDialog" 
             argument="WebFolderDlg" condition="ShowWebFolderDlg <> 1" />
         <controlevent dialog="SetupTypeDlg" control="Back" name="NewDialog" 
             argument="WebFolderDlg" condition="ShowWebFolderDlg = 1" />
         <controlevent dialog="WebFolderDlg" control="Cancel" name="SpawnDialog" 
             argument="CancelDlg" order="0" />
         <controlevent dialog="WebFolderDlg" control="Back" name="NewDialog" 
             argument="LicenseAgreementDlg" condition="ShowUserRegistrationDlg<>1" 
             order="0" />
         <controlevent dialog="WebFolderDlg" control="Back" name="NewDialog" 
             argument="UserRegistrationDlg" condition="ShowUserRegistrationDlg=1" 
             order="0" />
         <!-- Virtual Directory Control Events -->
         <controlevent dialog="WebFolderDlg" control="Next" name="DoAction" 
             argument="WEBCA_CreateURLs" condition="1" order="0" />
         <controlevent dialog="WebFolderDlg" control="Next" name="DoAction" 
             argument="WEBCA_EvaluateURLsMB" condition="1" order="1" />
         <controlevent dialog="WebFolderDlg" control="Next" name="SetTargetPath" 
             argument="TARGETDIR" condition="1" order="2" />
         <controlevent dialog="WebFolderDlg" control="Next" name="NewDialog" 
             argument="SetupTypeDlg" condition="1" order="3" />
     </controlevents>
         
  • Represents the an element based on a schema definition.

    </controlevents>

    <registry>

    Makes modifications to the Windows Registry of the target computer at runtime.

    Parameters

    Attribute Type Description Required
    component string Refrence to a component. The component that controls the installation of the registry value. True
    root msi:MSIRegistryKeyRoot Valid input:
    • dependent - If this is a per-user installation, the registry value is written under HKEY_CURRENT_USER. If this is a per-machine installation, the registry value is written under HKEY_LOCAL_MACHINE. Note that a per-machine installation is specified by setting the ALLUSERS property to 1.
    • machine represents HKEY_LOCAL_MACHINE
    • classes represents HKEY_CLASSES_ROOT
    • user represents HKEY_CURRENT_USER
    • users represents HKEY_USERS
    True
    path string Registry key. True

    Nested Elements:

    <value>

    </value>

    Examples

  • Add the a couple registry entries on the target machine.

    <registry>
        <key component="C__MainFiles" root="machine" path="SOFTWARE\ACME\My Product\" >
            <value name="ProductVersion" value="1.0.0" />
            <value name="ProductDir" value="[TARGETDIR]" />
            <value name="VirtualDir" value="[TARGETVDIR]" />
        </key>
    </registry>
        
  • Add a default key value to the specified registry key path

    <registry>
        <key component="C__MainFiles" root="machine" path="SOFTWARE\ACME\My Product\" >
            <value value="1.0.0" />
        </key>
    </registry>
        
  • Another way to add a default key value to the specified registry key path

    <registry>
        <key component="C__MainFiles" root="machine" path="SOFTWARE\ACME\My Product\" >
            <value name="" value="1.0.0" />
        </key>
    </registry>
        
  • Specify hexadecimal value (REG_BINARY) for the default key

    <registry>
        <key component="C__MainFiles" root="machine" path="SOFTWARE\ACME\My Product\" >
            <value>
    1a,81,0a,03,01,00,06,00,00,00,d3,15,fd,00,01,00,00,00,00,00,01,
    00,00,00,00,00,00,00,00,00,00,00,b0,90,ce,09,01,00,00,00,00,00,ff,ff,ff,00,
    00,00,00,00,00,00,00,00,6d,7a,0a,03,01,00,00,00,00,00,00,00,38,40,00,00,00,
    00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,01,00,00,00,00,0f,00,00,00,
    f0,ff,ff,ff,54,69,6d,65,73,20,4e,65,77,20,52,6f,6d,61,6e,f4,6f,d4,08,02,00
            </value>
        </key>
    </registry>
        
  • Represents the an element based on a schema definition.

    </registry>

    <icons>

    Stores icons to be used with shortcuts, file extensions, CLSIDs or similar uses.

    Parameters

    Attribute Type Description Required
    name string Name of the icon file. True
    value string The binary icon data in PE (.dll or .exe) or icon (.ico) format. True

    Examples

  • Add a compiled help icon to the msi database; To be used with a shortcut.

    <icons>
        <icon name="CHMICON" value="${resource.dir}\chm.ico" />
    </icons>
        
  • Represents the an element based on a schema definition.

    </icons>

    <shortcuts>

    Creates shortcuts on the target computer.

    Parameters

    Attribute Type Description Required
    name string Unique name identifying the shortcut. True
    directory string Reference to a directory. The location of where the shortcut should be created. True
    filename string The localizable name of the shortcut to be created. True
    component string Reference to a component. The installer uses the installation state of this specified component to determine whether the shortcut is created or deleted. This component must have a valid key path for the shortcut to be installed. If the Target column contains the name of a feature, the file launched by the shortcut is the key file of the component listed in this column. True
    target string The shortcut target. The installer evaluates this field as a Formatted string. The field should contains a property identifier enclosed by square brackets ([ ]), that is expanded into the file or a folder pointed to by the shortcut. True
    arguments string The command-line arguments for the shortcut.

    Note that the resolution of properties in the Arguments field is limited. A property formatted as [Property] in this field can only be resolved if the property already has the intended value when the component owning the shortcut is installed. For example, for the argument "[#MyDoc.doc]" to resolve to the correct value, the same process must be installing the file MyDoc.doc and the component that owns the shortcut.
    False
    hotkey string The hotkey for the shortcut. The low-order byte contains the virtual-key code for the key, and the high-order byte contains modifier flags. This must be a non-negative number. Authors of installation packages are generally recommend not to set this option, because this can add duplicate hotkeys to a users desktop. In addition, the practice of assigning hotkeys to shortcuts can be problematic for users using hotkeys for accessibility. False
    icon string Reference to an icon. False
    iconindex int The icon index for the shortcut. This must be a non-negative number. False
    showcmd int The Show command for the application window.

    The following values may be used. The values are as defined for the Windows API function ShowWindow.
    ValueDescription
    1SW_SHOWNORMAL
    3SW_SHOWMAXIMIZED
    7SW_SHOWMINNOACTIVE
    False
    wkdir string The name of the property that has the path of the working directory for the shortcut. False

    Nested Elements:

    <description>

    </description>

    Examples

  • Add a compiled help icon to the msi database; To be used with a shortcut.

    <shortcuts>
        <shortcut name="HelpFiles" directory="D__PROGRAMMENU_ACME_MYPRODUCT" filename="Help File" component="C__MainFiles" target="[$C__MainFiles]\Help.chm" icon="CHMICON" iconindex="0" showcmd="3" >
            <description>My Product help documentation</description>
        </shortcut>
    </shortcuts>
        
  • Represents the an element based on a schema definition.

    </shortcuts>

    <binaries>

    Stores the binary data for items such as bitmaps, animations, and icons. The binary table is also used to store data for custom actions.

    Parameters

    Attribute Type Description Required
    name string A unique key that identifies the particular binary data. If the binary data is for a control, the key appears in the Text column of the associated control in the Control table. This key must be unique among all controls requiring binary data. True
    value string The binary file to add. True

    Examples

  • Add the custom action dll to create/modify virtual directories

    <binaries>
        <binary name="MSVBDPCADLL" value="${resource.dir}\MSVBDPCA.DLL" />
    </binaries>
        
  • Represents the an element based on a schema definition.

    </binaries>

    <customactions>

    Used to configure executables that may be run during steps in the installation process to do things outside the bounds of MSI technology's feature set. This is the main spot you can extend MSI technology to perform custom processes via compiled code.

    Parameters

    Attribute Type Description Required
    action string Name of the action. The action normally appears in a sequence table unless it is called by another custom action. If the name matches any built-in action, then the custom action is never called. True
    type string A field of flag bits specifying the basic type of custom action and options. See Summary List of All Custom Action Types for a list of the basic types. See Custom Action Return Processing Options, Custom Action Execution Scheduling Options, Custom Action Hidden Target Option, and Custom Action In-Script Execution Options. True
    source string A property name or external key into another table. For a discussion of the possible custom action sources, see Custom Action Sources and the Summary List of All Custom Action Types. For example, the Source column may contain an external key into the first column of one of the following tables containing the source of the custom action code.

    Directory table for calling existing executables.

    File table for calling executables and DLLs that have just been installed.

    Binary table for calling executables, DLLs, and data stored in the database.

    Property table for calling executables whose paths are held by a property.
    True
    target string An execution parameter that depends on the basic type of custom action. See the Summary List of All Custom Action Types for a description of what should be entered in this field for each type of custom action. For example, this field may contain the following depending on the custom action.
    TargetCustom Action
    Entry point (required)Calling a DLL.
    Executable name with arguments (required)Calling an existing executable.
    Command line arguments (optional)Calling an executable just installed.
    Target file name (required)Creating a file from custom data.
    NullExecuting script code.
    True

    Examples

  • Add some custom actions related to the virtual directory dialog and custom action.

    <customactions>
        <!-- Custom actions creating entry points into the custom action dll specified in the binary table -->
        <customaction action="WEBCA_GatherWebFolderProperties" type="1" source="MSVBDPCADLL" target="GatherWebFolderProperties" />
        <customaction action="WEBCA_ApplyWebFolderProperties" type="1537" source="MSVBDPCADLL" target="ApplyWebFolderProperties" />
        <customaction action="WEBCA_RollbackApplyWebFolderProperties" type="1281" source="MSVBDPCADLL" target="RollbackApplyWebFolderProperties" />
        <customaction action="WEBCA_CreateURLs" type="1" source="MSVBDPCADLL" target="CreateURLs" />
        <customaction action="WEBCA_EvaluateURLs" type="1" source="MSVBDPCADLL" target="EvaluateURLs" />
        <customaction action="WEBCA_EvaluateURLsNoFail" type="1" source="MSVBDPCADLL" target="EvaluateURLsNoFail" />
        <customaction action="WEBCA_EvaluateURLsMB" type="1" source="MSVBDPCADLL" target="EvaluateURLsMB" />
        <customaction action="WEBCA_CreateAppRoots" type="1" source="MSVBDPCADLL" target="CreateAppRoots" />
        
        <!-- Custom actions to set default control values in the webfolder dialog -->
        <customaction action="WEBCA_TARGETVDIR" type="307" source="TARGETVDIR" target="Default VDir" />
        <customaction action="WEBCA_TARGETPORT" type="307" source="TARGETPORT" target="80" />
    </customactions>
        
  • Represents the an element based on a schema definition.

    </customactions>

    <sequences>

    Used to modify the sequence of tasks/events that execute during the overall installation process.

    Parameters

    Attribute Type Description Required
    type msi:MSISequenceTable Valid inputs: True
    action string Name of the action to execute. This is either a built-in action or a custom action. True
    value int Number that determines the sequence position in which this action is to be executed.

    A positive value represents the sequence position. A Null value indicates that the action is not executed. The following negative values indicate that this action is to be executed if the installer returns the associated termination flag. No more than one action may have a negative value entered in the Sequence field.
    ValueDescription
    -1Successful completion.
    -2User terminates install.
    -3Fatal exit terminates.
    -4Install is suspended.
    True
    condition string This field contains a conditional expression. If the expression evaluates to False, then the action is skipped. If the expression syntax is invalid, then the sequence terminates, returning iesBadActionData. False

    Examples

  • Add the sequences to support virtual directories

    <sequences>
        <sequence type="installexecute" action="WEBCA_TARGETVDIR" value="750" condition="TARGETVDIR=&quot;&quot;" />
        <sequence type="installexecute" action="WEBCA_TARGETPORT" value="750" condition="TARGETPORT=&quot;&quot;" />                                    
        <sequence type="installexecute" action="WEBCA_CreateURLs" value="752" condition="NOT Installed" />
        <sequence type="installexecute" action="WEBCA_EvaluateURLs" value="753" condition="NOT Installed" />
        <sequence type="installexecute" action="WEBCA_GatherWebFolderProperties" value="3701" condition="NOT Installed" />
        <sequence type="installexecute" action="WEBCA_ApplyWebFolderProperties" value="3701" condition="NOT Installed" />
        <sequence type="installexecute" action="WEBCA_RollbackApplyWebFolderProperties" value="3701" condition="NOT Installed" />
        <sequence type="installexecute" action="WEBCA_CreateAppRoots" value="3701" condition="NOT Installed" />
        <sequence type="installui" action="WEBCA_TARGETVDIR" value="750" condition="TARGETVDIR=&quot;&quot;" />
        <sequence type="installui" action="WEBCA_TARGETPORT" value="750" condition="TARGETPORT=&quot;&quot;" />
        <sequence type="installui" action="WEBCA_CreateURLs" value="752" condition="NOT Installed" />
        <sequence type="installui" action="WEBCA_EvaluateURLsNoFail" value="753" condition="NOT Installed" />
        <sequence type="adminexecute" action="WEBCA_TARGETVDIR" value="750" condition="TARGETVDIR=&quot;&quot;" />
        <sequence type="adminexecute" action="WEBCA_TARGETPORT" value="750" condition="TARGETPORT=&quot;&quot;" />
        <sequence type="adminexecute" action="WEBCA_CreateURLs" value="752" condition="NOT Installed" />
        <sequence type="adminexecute" action="WEBCA_EvaluateURLs" value="753" condition="NOT Installed" />
        <sequence type="adminui" action="WEBCA_TARGETVDIR" value="750" condition="TARGETVDIR=&quot;&quot;" />
        <sequence type="adminui" action="WEBCA_TARGETPORT" value="750" condition="TARGETPORT=&quot;&quot;" />
        <sequence type="adminui" action="WEBCA_CreateURLs" value="752" condition="NOT Installed" />
        <sequence type="adminui" action="WEBCA_EvaluateURLsNoFail" value="753" condition="NOT Installed" />                        
    </sequences>
        
  • Represents the an element based on a schema definition.

    </sequences>

    <actiontext>

    Creates text to be displayed in a progress dialog box and written to the log for actions that take a long time to execute. The text displayed consists of the action description and optionally formatted data from the action. The entries in the ActionText table typically refer to actions in sequence tables.

    Parameters

    Attribute Type Description Required
    name string Unique name identifying the action. True
    template string A localized format template is used to format action data records for display during action execution. If no template is supplied, then the action data will not be displayed. False

    Nested Elements:

    <description>

    </description>

    Examples

  • Add the related action text for the web folder actions.

    <actiontext>
        <action name="WEBCA_GatherWebFolderProperties" >
            <description>Gathering web folder properties</description>
        </action>
        <action name="WEBCA_ApplyWebFolderProperties" >
            <description>Applying web folder properties</description>
        </action>
        <action name="WEBCA_RollbackApplyWebFolderProperties" >
            <description>Removing web folder properties</description>
        </action>
        <action name="WEBCA_CreateURLs" >
            <description>Creating URLs</description>
        </action>
        <action name="WEBCA_EvaluateURLs" >
            <description>Evaluating URLs</description>
        </action>
        <action name="WEBCA_EvaluateURLsNoFail" >
            <description>Evaluating URLs and do not fail if URL is invalid</description>
        </action>
        <action name="WEBCA_EvaluateURLsMB" >
            <description>Evaluating URLs</description>
        </action>
        <action name="WEBCA_CreateAppRoots" >
            <description>Creating application roots</description>
        </action>
        <action name="WEBCA_TARGETVDIR" >
            <description>Set TARGETVDIR property to the specified virtual dir</description>
        </action>
        <action name="WEBCA_TARGETPORT" >
            <description>Set TARGETPORT property to the specified virtual dir port</description>
        </action>
    </actiontext>
        
  • Represents the an element based on a schema definition.

    </actiontext>

    <appmappings>

    Adds Verbs and a handler for the specified file type.

    Note: This not an officially Microsoft supported table.

    Parameters

    Attribute Type Description Required
    directory string Refrence to a directory. The directory to add the specific verb/handler to IIS for the specified file type. True
    extension string File name extension to specifically handle False
    exepath string Path to the Internet Server API (ISAPI) or Common Gateway Interface (CGI) program to run to process a request. False
    verbs string Internet Information Services verbs that are allowed for the executable file. Only verbs entered in this field will be allowed. False

    Examples

  • Add the aspx app mapping

    <appmappings>
        <appmapping directory="D__ACME_MyProduct" extension=".aspx" exepath="[DOTNETFOLDER]aspnet_isapi.dll" verbs="GET,HEAD,POST,DEBUG" />
    </appmappings>
        
  • Represents the an element based on a schema definition.

    </appmappings>

    <urlproperties>

    Determines the local path equivalent for a url and stores this information in a property.

    Note: This not an officially Microsoft supported table.

    Parameters

    Attribute Type Description Required
    name string The name of the URLProperty to convert True
    property string The name of the property to store the directory information. True

    Examples

  • Convert the TARGETURL property to a directory and store that information in TARGETDIR

    <urlproperties>
        <urlproperty name="TARGETURL" property="TARGETDIR" />
    </urlproperties>
        
  • Represents the an element based on a schema definition.

    </urlproperties>

    <vdirproperties>

    Creates a URLProperty representing the virtual directory and port.

    Note: This not an officially Microsoft supported table.

    Parameters

    Attribute Type Description Required
    name string Property containing the virtual directory True
    portproperty string Property containing the network port number to use. True
    urlproperty string URLProperty to store the url in True

    Examples

  • Convert the virtual directory and port to a url and store the value in a property.

    <vdirproperties>
        <vdirproperty name="TARGETVDIR" portproperty="TARGETPORT" urlproperty="TARGETURL" />
    </vdirproperties>
        
  • Represents the an element based on a schema definition.

    </vdirproperties>

    <approots>

    Create a Web application definition and marks it as running in-process or out-of-process. If an application already exists at the specified path, you can use this method to reconfigure the application from in-process to out-of-process, or the reverse.

    Note: This not an officially Microsoft supported table.

    Parameters

    Attribute Type Description Required
    component string Reference to a component. Determines when the approot will be created. True
    urlproperty string URLProperty with stored url True
    inprocflag int Specifies whether the application being created is to run in-process (0), out-of-process (1), or in a pooled process (2). If the application already exists and is running, changing the value of this flag will cause the application definition to be deleted and a new application created to run in the specified process space. True

    Examples

  • Convert the virtual directory and port to a url and store the value in a property.

    <approots>
        <approot component="C__MainFiles" urlproperty="TARGETURL" inprocflag="2" />
    </approots>
        
  • Represents the an element based on a schema definition.

    </approots>

    <iisproperties>

    Specifies directory security in IIS. Can also configure the default documents supported by each directory.

    Note: This not an officially Microsoft supported table.

    Parameters

    Attribute Type Description Required
    directory string Reference to a directory. This is the directory that gets modified with the specific attributes. True
    attr int Attributes to set for the directory.
    ValueFlag NameDescription
    1AccessReadThe file or the contents of the folder may be read through Microsoft Internet Explorer.
    2AccessWriteUsers are allowed to upload files and their associated properties to the enabled directory on your server or to change content in a Write-enabled file. Write can be implemented only with a browser that supports the PUT feature of the HTTP 1.1 protocol standard.
    4AccessExecuteThe file or the contents of the folder may be executed, regardless of file type.
    8AccessSSLFile access requires SSL file permission processing, with or without a client certificate.
    16AccessSourceUsers are allowed to access source code if either Read or Write permissions are set. Source code includes scripts in Microsoft ® Active Server Pages (ASP) applications.
    32AccessSSLNegotiateCertSSL file access processing requests a certificate from the client. A value of false indicates that access continues if the client does not have a certificate. Some versions of Internet Explorer will close the connection if the server requests a certificate and a certificate is not available (even if AccessSSLRequireCert is also set to true).
    64AccessSSLRequireCertSSL file access processing requests a certificate from the client. If the client provides no certificate, the connection is closed. AccessSSLNegotiateCert must also be set to true when using AccessSSLRequireCert.
    128AccessSSLMapCertSSL file permission processing maps a client certificate to a Microsoft Windows ® operating system user-account. The AccessSSLNegotiateCert property must also be set to true for the mapping to occur.
    256AccessSSL128File access requires SSL file permission processing with a minimum key size of 128 bits, with or without a client certificate.
    512AccessScriptThe file or the contents of the folder may be executed if they are script files or static content. A value of false only allows static files, such as HTML files, to be served.
    1024AccessNoRemoteWriteRemote requests to create or change files are denied; only requests from the same computer as the IIS server succeed if the AccessWrite property is set to true. You cannot set AccessNoRemoteWrite to false to enable remote requests, and set AccessWrite to false to disable local requests.
    4096AccessNoRemoteReadRemote requests to view files are denied; only requests from the same computer as the IIS server succeed if the AccessRead property is set to true. You cannot set AccessNoRemoteRead to false to enable remote requests, and set AccessRead to false to disable local requests.
    8192AccessNoRemoteExecuteRemote requests to execute applications are denied; only requests from the same computer as the IIS server succeed if the AccessExecute property is set to true. You cannot set AccessNoRemoteExecute to false to enable remote requests, and set AccessExecute to false to disable local requests.
    16384AccessNoRemoteScriptRequests to view dynamic content are denied; only requests from the same computer as the IIS server succeed if the AccessScript property is set to true. You cannot set AccessNoRemoteScript to false to enable remote requests, and set AccessScript to false to disable local requests.
    32768AccessNoPhysicalDirAccess to the physical path is not allowed.
    True
    defaultdoc string Adds a filename to the Default Documents to process. Add multiple separated with a comma (Eg. "Default.aspx,Default.htm") False

    Examples

  • Specify permissions for the directory structure.

    <iisproperties>
        <iisproperty directory="TARGETDIR" attr="626" defaultdoc="Default.aspx" />
        <iisproperty directory="D__BIN" attr="112" />
        <iisproperty directory="D__SomeSubDir" attr="114" />
    </iisproperties>
        
  • Represents the an element based on a schema definition.

    </iisproperties>

    Requirements

    Assembly: NAnt.Contrib.Tasks (0.92.4526.0)