I'm having an issue with an If statement when comparing version numbers. I have a very simple script for testing.
The version in my registry and the version to compare against is the same. In the If statement, I should be getting the MessageBox "No need to upgrade", but I am not.
Does anyone have any suggestions?
Code: Select all
Define Component: Native Setup
Set Variable VERSION_CHECK to 22.0.0.192
Read Registry Key HKLM\SOFTWARE\Macromedia\FlashPlayerActiveX\Version into VERSION_REGISTRY
MessageBox: , VERSION_CHECK: $VERSION_CHECK$$NEWLINE$$NEWLINE$VERSION_REGISTRY: $VERSION_REGISTRY$
if Variable VERSION_REGISTRY Greater Than (Version) $VERSION_CHECK$
MessageBox: , No Need to upgrade
else
MessageBox: , Need to upgrade
end
Terminate Installation
Code: Select all
~InstallAware Clipboard Data~
~Terminate Install~
~{A696F45A-D7FE-4BEE-A223-1FB7A97B6DD1}~
~Comment~
~{6F68447A-7A2F-4D0A-B8EF-CFDFDF8B5795}~
~~
~End~
~{5E3307C7-5A25-4C50-BE9E-8A6A65C1A111}~
~MessageBox~
~{8CAEAE8E-AB27-47FD-9205-3EA1E0E8B5BB}~
~~
~Need to upgrade~
~0~
~2~
~~
~Else~
~{8A394F6E-0974-4547-857B-497BC14AFCEA}~
~MessageBox~
~{319F5974-8DA9-4FE5-8A29-CE993E3CA61D}~
~~
~No Need to upgrade~
~0~
~2~
~~
~If~
~{B5F34C3C-5B10-4720-AD32-B366090FC916}~
~VERSION_REGISTRY~
~6~
~$VERSION_CHECK$~
~FALSE~
~Comment~
~{451768FA-5291-488F-82E2-53D431C8AD99}~
~~
~MessageBox~
~{C9959FD0-C51B-45E4-B26C-184BCE45D97A}~
~~
~VERSION_CHECK: $VERSION_CHECK$$NEWLINE$$NEWLINE$VERSION_REGISTRY: $VERSION_REGISTRY$~
~0~
~1~
~~
~Comment~
~{E361AF78-8369-4D4E-B0AD-49779A77CF90}~
~~
~Read Registry~
~{35B10BAB-893B-4CF5-8CDE-00D66FC853D6}~
~VERSION_REGISTRY|~
~2~
~SOFTWARE\Macromedia\FlashPlayerActiveX~
~Version~
~Comment~
~{72A5A6A0-E228-4EAA-B6A4-5E0DBFF83FA9}~
~~
~Set Variable~
~{794D2D49-330E-4D42-B4FE-C5BB86475F2D}~
~VERSION_CHECK$MYAH$MYAH$FALSE~
~22.0.0.192~
~Comment~
~{EDC6C120-345B-4E84-AC6A-E9FEA8F70720}~
~~
~Define Component~
~{71C297CB-4ED6-4ED5-958C-131E0F2848A6}~
~Native Setup~
~TRUE~
~Description for #TITLE#~