A.Russell
Posts: 23
Joined: Sat Nov 12, 2005 5:30 am
Location: Japan

Search Feature -What to Search for

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).
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

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:

Code: Select all

HKLM\Software\Microsoft\DirectX\Version
Please see the following link for the various DirectX versions:
http://www.computerhope.com/directx.htm

For SAPI, I believe you have to check the version of the following files:

Code: Select all

C:\Program Files\Common Files\SpeechEngines\Microsoft\SR\Spsreng.dll
or

Code: Select all

C:\Program Files\Common Files\SpeechEngines\Microsoft\SR\Spsrx.dll
I found this information in the following Microsoft KB article:
http://support.microsoft.com/default.as ... -us;295947

Hope this helps.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
A.Russell
Posts: 23
Joined: Sat Nov 12, 2005 5:30 am
Location: Japan

Took a while to get back to this.

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.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

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.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
A.Russell
Posts: 23
Joined: Sat Nov 12, 2005 5:30 am
Location: Japan

Thanks again Ionut,

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.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

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).

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
A.Russell
Posts: 23
Joined: Sat Nov 12, 2005 5:30 am
Location: Japan

Thank you Denis.

One thing that I think may be a bug. The file generated says, "This installer database ....to install <product name>. "

I have got a product name inserted on the Product Details page.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

Please give me more details about this error message. Also, generate a log file, using a command line similar to the following:

Code: Select all

msiexec /i package.msi /L*V "install.log"
Please send the log and the AIP file to support at advancedinstaller dot com so I can determine the cause of the problem.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”