Magnus Ahlin
Magnus Ahlin

Reputation: 655

Wix checking Silverlight version

In my Wix bootstrapper I magage to get hold of the installed version of Silverlight with:

 <Variable Name="SilverLightSearch" Value="0" Type="version"  />
 <util:RegistrySearch Id="SilverLightSearchId" Format="compatible" 
 Root="HKCR" Key="AgControl.AgControl\CurVer"
 Variable="SilverLightSearch" />

In the install log I get this: Setting string variable SilverLightSearch to value AgControl.AgControl.5.1

However in my DetectCondition I cant compare against it

    DetectCondition="SilverLightSearch = AgControl.AgControl.5.1"

Always returns false.

Ideally I would compare against this and later versions, as in greater than 5.1

Upvotes: 1

Views: 231

Answers (1)

Magnus Ahlin
Magnus Ahlin

Reputation: 655

I managed to figure it out myself:

<util:RegistrySearch Format="raw" Result="value"  Root="HKCR" Key="AgControl.AgControl\CurVer" Variable="SilverLightSearch" />

and the condition:

DetectCondition="SilverLightSearch >= v5.1"

Upvotes: 2

Related Questions