Searches for file, directory or registry key and assigns to value of parent Property
Windows Installer references
RegLocator Table, Signature Table
- DirectorySearch (no more than 1)
- DirectorySearchRef (no more than 1)
- FileSearch (no more than 1)
- FileSearchRef (no more than 1)
When the Type attribute value is 'directory' the registry value must specify the path to a directory excluding the file name. When the Type attribute value is 'file' the registry value must specify the path to a file including the file name; however, if there is no child FileSearch element the parent directory of the file is returned. The FileSearch element requires that you author the name of the file you are searching for. If you do not know the file name you must set the Type attribute to 'raw' to return the full file path including the file name.
: Overrides the default registry to search. The value
always64 will force
the search to look in the 64-bit registry even when building for 32-bit.
Simliarly, the value
always32 will force the search to look in the 32-bit
registry even when building for 64-bit.
The default value is
default where the search will look in the same registry
as the bitness of the package.
Id (String, required) : Signature to be used for the file, directory or registry key being searched for.
Key (String, required) : Key for the registry value.
Name (String) : Registry value name. If this value is null, then the value from the key's unnamed or default value, if any, is retrieved.
Root (enumeration, required) : Root key for the registry value. This attribute's value must be one of the following:
- HKCR: HKEY_CLASSES_ROOT
- HKCU: HKEY_CURRENT_USER
- HKLM: HKEY_LOCAL_MACHINE
- HKU: HKEY_USERS
Type (enumeration, required) : The value must be 'file' if the child is a FileSearch element, and must be 'directory' if child is a DirectorySearch element. This attribute's value must be one of the following:
directory: The registry value contains the path to a directory.
file: The registry value contains the path to a file. To return the full file path you must add a FileSearch element as a child of this element; otherwise, the parent directory of the file path is returned.
raw: Sets the raw value from the registry value. Please note that this value will contain a prefix as follows:
DWORD: Starts with
#optionally followed by
REG_BINARY: Starts with
#xand the installer converts and saves each hexadecimal digit (nibble) as an ASCII character prefixed by
REG_EXPAND_SZ: Starts with
REG_MULTI_SZ: Starts with
[~]and ends with
REG_SZ: No prefix, but if the first character of the registry value is
#, the installer escapes the character by prefixing it with another