DirectorySearch Element

WiX Toolset

DirectorySearch Element

Description
Searches for directory and assigns to value of parent Property.
Windows Installer references
DrLocator Table, Signature Table
Parents
ComplianceCheck, ComplianceDrive, ComponentSearch, DirectorySearch, DirectorySearchRef, IniFileSearch, Property, RegistrySearch
Inner Text
None
Children
Choice of elements (min: 0, max: 1)
Attributes
Name Type Description Required
Id String Unique identifier for the directory search. Yes
AssignToProperty YesNoType Set the value of the outer Property to the result of this search. See remarks for more information.  
Depth Integer Depth below the path that the installer searches for the file or directory specified by the search. See remarks for more information.  
Path String Path on the user's system. Either absolute, or relative to containing directories.  
Remarks

Use the AssignToProperty attribute to search for a file but set the outer property to the directory containing the file. When this attribute is set to 'yes', you may only nest a FileSearch element with a unique Id or define no child element.

When the parent DirectorySearch/@Depth attribute is greater than 0, the FileSearch/@Id attribute must be absent or the same as the parent DirectorySearch/@Id attribute value, unless the parent DirectorySearch/@AssignToProperty attribute value is 'yes'.
How Tos and Examples
See Also
Wix Schema, ComponentSearch, IniFileSearch, RegistrySearch