4
<ExePackage InstallCommand='/q /action=UPGRADE /HIDECONSOLE /IACCEPTSQLSERVERLICENSETERMS=1 /INSTANCENAME=ABC' InstallCondition="SqlVersion32 &lt; v10.50.1600.1 AND SqlEdition32 = 'Express Edition'"/>

I am using the above code. In install condition I want to check if SqlEdition32 (its value is provided by a registry search) is Express edition but I am having error saying:

Error 0x8007000d: Failed to parse condition "SqlVersion32 < v10.50.1600.1 AND SqlEdition32='Express Edition'". Unexpected character at position 46.

Position 46 is where I am comparing SqlEdition32 string variable to string 'Express Edition' I want to know how to compare strings in WiX?

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
ABHI
  • 173
  • 3
  • 7

2 Answers2

1

Use double quotes around strings, not single quotes.

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
1

You have two solutions:

  1. You can replace double quotes with single quote and vice versa, so you will have something like this:
InstallCondition='SqlVersion32
    &lt; v10.50.1600.1 AND SqlEdition32 = "Express Edition"'
  1. Or replace single quote ' with &quot ;, you will get:
InstallCondition="SqlVersion32 &lt; v10.50.1600.1 AND
    SqlEdition32 = &quot;Express Edition&quot;"
Reda Beloued
  • 126
  • 8