GetMediaPlayerVersion function
Find the currently installed version of Windows Media player and store it in the passed-in symbolic variable as a.b.c.d, suitable for version testing and general conditions. If Windows Media player is not found or if it does not have an embedded version number, the variable is set to an empty string.
The GetMediaPlayerVersion function is a predefined extension DLL function that is distributed with InstallMate. You can use this function by adding a Run DLL action to the action sequence in which you want to run the action. Set the Run DLL action attributes as follows:
- Function name: GetMediaPlayerVersion
- Arguments: varname
Arguments
The GetMediaPlayerVersion function expects the following argument.
- varname
- The name of the variable to which to assign the version number of Windows Media player, if found. If not found or if it the player's file does not have an embedded version number, the variable is set to an empty string.
Return value
Returns ERROR_SUCCESS (zero) if successful, else a nonzero error code. This error code is available in the LastExitCode variable. To find out if the version number was found, test the varname variable.
Remarks
To use this function, you must add the extension DLL to your InstallMate project. The easiest way to do so is as follows:
- Open your InstallMate project.
- Choose File > Import > Project Items... from the main menu bar.
- Browse for and select the file Insert Extension DLL.imq, then click Open.
Alternatively, you can go to the Installer options page in your InstallMate project, click on the Advanced... button, then click on the Extension DLL tab and enter the paths to the extension DLL versions there.