Find
The <Find> element describes how to determine if this package is applicable. If any of the <Find/> blocks can locate the executable, then this package will be used.
Satisfaction
A <Find/> block is said to be satisfied if it has found the appropriate executable. The <Find/> block is always looking for a file on a disk with the name given by its child <Name/> element. The <Find/> element uses the <Location/> tags to determine where the executable is located. Each one looks for a string value, which is then checked to see if it points to an appropriately-named file. If a <Location/> finds a path to a real file but the file's name does not match the <Name/> element, the <Find/> block is not satisfied. The block is satisfied only if the <Location/> finds a path and that path points to a properly named file matching the <Name/> element.
Multiple EXE Names
If the application to be migrated can have different names (e.g. one for 32-bit systems, another for 64-bit systems), you should specify multiple <Find/> blocks, one for each name:
<Find>
<Name>Crunch64.exe</Name>
<Location Type="file" File="%programfiles%\Crunch\Crunch64.exe" />
<Location Type="registry" SubType="value">
HKCU\Software\Crunch\NativeLocation
</Location>
</Find>
<Find>
<Name>Crunch32.exe</Name>
<Location Type="file" File="%programfiles%\Crunch\Crunch32.exe" />
<Location Type="registry" SubType="value">
HKCU\Software\Crunch\NativeLocation
</Location>
</Find>
Order of Evaluation
<Find/> blocks are evaluated in document order. The first one is evaluated first, the second second, and so on. As soon as any block is satisfied, evaluation ceases; the subsequent blocks are ignored. As such, if it is important which executable is found, you should put the more desirable ones at the top of the list.
No Find Needed
Sometimes you are writing a package for something that you know will always be present, for example, a system component or built-in application. In such cases, you can omit the <Find/> blocks entirely. The engine treats this as automatic satisfaction and migrates the settings package.
Attributes
|
Description
|
Possible Values
|
Required?
|
None
|
|
|
|
|