Hi,
This cannot be done by comparing the versions as strings, you need to compare them as numbers. The only way to do that is through a custom action. Here is a VBS code that do that:
Code: Select all
Dim arrayReqVers, arrayFoundVers
requiredVersion = "4.09.0000.0904"
foundVersion = Session.Property("SEARCH_PROPERTY")
arrayFoundVers = Split(foundVersion, ".", -1, 1)
arrayReqVers = Split(requiredVersion, ".", -1, 1)
found = -1
If UBound(arrayFoundVers) = 3 Then
For i = 0 To 3
nr1 = CInt(arrayFoundVers(i))
nr2 = CInt(arrayReqVers(i))
If nr1 > nr2 Then
Session.Property("DIRECTX") = "TRUE"
Exit For
ElseIf nr1 = nr2 Then
found = found + 1
Else
Exit For
End If
Next
If found = 3 Then
Session.Property("DIRECTX") = "TRUE"
End If
End If
Copy this code to a .vbs file and add it as "New Attached Custom Action" in the "Custom Actions" page under "InstallUISequence->AppSearch" standard action. Leave the "Function Name" empty and use (Not Installed) as "Execution Condition".
Define the DIRECTX property in the "InstallParameters" page with "FALSE" for its value (without quotes).
Now switch to "Dialogs" page and use those conditions to display the dialogs:
To display the DirectX dialog use (the DirectX need to be installed):
To skip the DirectX dialog use (the DirectX is already installed):
Please let me know if you encounter any problems.
Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
FOLLOW US
Get the latest news in Application Packaging