Can you use the search feature to find out if a minimum application is already installed on the target machine?
In my case, I'd like to find out if the target computer has at least DirectX8 and SAPI 5.1. How is this done? (I can see that there are lots of options for searching, but I don't know what to search for).
Generally speaking, it is hard to determine the search criteria. You need to know what files/registry keys are created by that particular application. A web search is usually your first option.
For DirectX you need to perform a Registry Search for the following registry value:
Thank you very much for that explanation. I thought perhaps there was a standard thing to check for.
I am having a bit of trouble working out what to do with the returned value. It seems to return both true and false so far, and it looks like once that is sorted out a custom script is needed to open a box to ask if you want to download the missing component. Am I on the right track? I can't find an example in the documentation.
Actually, the searches will not return true or false. In case of DirectX, the Registry Search will return a string containing the installed version (for DirectX 9.0c this string will be "4.09.0000.0904") or an empty string if the specified registry value is not found.
In case of SAPI, the File Search will return the full path of the specified file, if it is found and it satisfies the search conditions, or an empty string if the file is not found (or it is found, but it does not satisfy the search conditions).
Basically, you have two options:
1. If you want to install SAPI and DirectX on the users machine in case they are not already installed, then you would use Prerequisites. For each Prerequisite you can set the search condition and its location (this can be an URL, Open site, or a file from your package).
2. If you want to abort the installation if DirectX or SAPI are not available, then you would use a File Search and a Registry Search combined with an Error Message Custom Action.
Please give me more details about what you are trying to achieve.
I was able to get it working after that explanatoin.
One last question. There are three files generated at compile time: The msi, an .exe and a text file. Do all three need to be distributed? I tried deleting the .exe and .txt and the msi still ran on my machine, so I am uncertain whether they are needed or not.
The existence of the Prerequisites is verified by the .EXE setup file and the settings for each Prerequisite are found in the .INI file. Therefore, they are required.
If you want to create a single EXE setup file, then select the "Include install files in EXE" radio button (in the Media page).