\Source CodeCommandsFileFindInListedDirs
The "FileFindInListedDirs" Command |
This command is used to find a file (perhaps to validate its existance).
It is similar to "FileFind" but can search
multiple directories at once.
It doesn't search within subdirectories (or search for a directory).
The found item's name is placed into a property specified by you.
As the search is done via the "AppSearch" table
entry, you may wish to modify the sequencing of this action.
This command takes these parameters:
- Dirs (required)
This is a list of one or more directories that should be searched
separated by ";" for example:
"[System64Folder];[SystemFolder];C:\TMP\SUBDIR".
The full name of the file will be saved to the specified property
(the first folder where the file is found).
- Property (required)
This is the name of the property to be updated if the file (or directory)
is found (it must not contain lower case characters).
The property is not created if the file wasn't found.
- Abort (optional)
If you pass "-" to this parameter then you don't want to
abort the install if the file wasn't found.
Normally it will abort with an informative error message
listing the directories that were searched.
The default for this parameter is an empty string (""),
anything other than "" (or "-") is an extra "condition" that
needs to be met to cause an abort
(similar to the "Condition" parameter on the
"FileFind" command).
- File (required)
This command allows searching for a file (but not a directory). If the filename is not a valid "8.3" name then you may want to consider using the "8.3" parameter otherwise MAKEMSI will determine the "likely" (not potentially "known") name.
This parameter also supports the "8.3|long" windows installer format.
- 8.3 (optional)
This is the 8.3 (short name) of the file we are searching for. If an "8.3" name is not supplied then if required one will be generated however this may not always match the one you really need to find (for example if you need to find "A_FILE~7.TXT" and not "A_FILE~1.TXT"). - ValidateAfter (optional)
The validation (if performed) is inserted into the "InstallUISequence" and "InstallExecuteSequence" tables. By default the check will be inserted after the standard "AppSearch" action, this parameter can be used to specify another action name. The need for this parameter is probably rare but you would need to specify "ResolveSource" if you wish to look for files relative to the "SourceDir" (MSI) directory. See the "COMPANY_INSERT_ResolveSourceAction" macro or take some other action to install this action if required.
- Parent (optional)
This is the "Parent" row of the "DrLocator" table and defaults to "". - MinVersion (optional)
This is the "MinVersion" row of the "Signature" table and defaults to "". - MaxVersion (optional)
This is the "MaxVersion" row of the "Signature" table and defaults to "". - MinSize (optional)
This is the "MinSize" row of the "Signature" table and defaults to "". - MaxSize (optional)
This is the "MaxSize" row of the "Signature" table and defaults to "". - MinDate (optional)
This is the "MinDate" row of the "Signature" table and defaults to "". - MaxDate (optional)
This is the "MaxDate" row of the "Signature" table and defaults to "". - Languages (optional)
This is the "Languages" row of the "Signature" table and defaults to "". - Signature (optional)
A search "signature" is something that gets displayed to the user, it is an MSI "Identifier" and so can't contain spaces and most special characters. The default signature is the property name so if you make this meaningful then you probably don't need to use this parameter (except in the case where you might be populating the same property from two or more sources).
Look for "WSCRIPT.EXE" in the 3 directories listed:
<$FileFindInListedDirs Property="WSCRIPT.EXE" File="WSCRIPT.EXE" DIRS="[System64Folder];[SystemFolder];[WindowsFolder]" MaxSize=~88889999~>