[wix-users] Bundle: DetectCondition with semantic versioning

Thomas.Deboben.ext at rohde-schwarz.com Thomas.Deboben.ext at rohde-schwarz.com
Mon Aug 24 02:46:02 PDT 2015

<a href="http://www.quantcast.com/p-34EL1DZyJypTI" target="_blank" 
rel="nofollow"> <img src="
http://pixel.quantserve.com/pixel/p-34EL1DZyJypTI.gif" style="display: 
none;" border="0" height="1" width="1" alt="Quantcast"/> </a> 
Hi all, 

I have a bootstrapper installer including an ExePackage of PostgreSQL 
So long I had a RegistrySearch for the Version value 

    <util:RegistrySearch Id="FindPostgreSQLx64" 

and a DetectCondition in the ExePackage 

DetectCondition="(PostgreSQLx64= v$(var.POSTGRESQLFULLVERSION))" 

with <?define POSTGRESQLFULLVERSION="" ?> 

This has worked fine so far, but with version PostgreSQL has 
changed the format of the Version value in the registry to semantic 
versioning like 9.4.4-3. 

With a new define 

  <?define POSTGRESQLSEMANTICVERSION="9.4.4-3" ?> 

the DetectCondition 

DetectCondition="(PostgreSQLx64= v$(var.POSTGRESQLSEMANTICVERSION))" 

will cause the error 

Error 0x8007000d: Failed to parse condition '(PostgreSQLx64= v9.4.4-3)' at 
position: 22 

So I thought the v before the $ will handle the compare as a Version 
compare but when I remove it I will get the error 
Setting string variable 'PostgreSQLx64' to value '9.4.4-3' 
Error 0x8007000d: Failed to parse condition "(PostgreSQLx64= 9.4.4-3)". 
Unexpected character at position 17. 

How do I have to change my detect condition to get it working? 

Many thanks, 

More information about the wix-users mailing list