Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WIX: how do conditions for Show Dialog work with properties like VS2010_IDE_VCSHARP_PROJECTSYSTEM_INSTALLED?

I need to show warning message to user (not Condition Message) based on VS2010_IDE_VWD_PROJECTSYSTEM_INSTALLED property value. Here is simple example:

{some files added}
...
<PropertyRef Id="VS2010_IDE_VWD_PROJECTSYSTEM_INSTALLED" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<UIRef Id="WixUI_InstallDir" />

<UI Id="CheckStudio">
  <Dialog Id="StudioDlg" Width="260" Height="75" Title="Hello" NoMinimize="yes" >

    <Control Id="Message" Type="Text" X="10" Y="10" Width="240" Height="40" Text="There is a problem." />

    <Control Id="Return" Type="PushButton" X="110" Y="52" Width="50" Height="17" Default="yes" Cancel="yes" Text="&amp;OK">
      <Publish Event="EndDialog" Value="Return">1</Publish>
    </Control>

  </Dialog>

  <InstallUISequence>
    <Show Dialog="StudioDlg" Sequence="1" >
      <![CDATA[Installed OR VS2010_IDE_VWD_PROJECTSYSTEM_INSTALLED]]>
    </Show>
  </InstallUISequence>

</UI>

I tried the following conditions:

VS2010_IDE_VWD_PROJECTSYSTEM_INSTALLED<>""
VS2010_IDE_VWD_PROJECTSYSTEM_INSTALLED<>"0"
VS2010_IDE_VWD_PROJECTSYSTEM_INSTALLED<>"{value}"

But nothing helps. On my both machines (one has VS installed, another one is clean) the dialog appears at the same time (but should be only on the first one). I did make a log and it shows that only on the first machine this property has a value. Ho do these properties (indicating something) should be used in such conditions? Maybe there is another way?

like image 554
Taras Kozubski Avatar asked Nov 13 '22 21:11

Taras Kozubski


1 Answers

This solved my problem after installing WIX 3.6:

<InstallUISequence>
   <Show Dialog="FrameworkDlg" After="CostFinalize" >
     <![CDATA[NOT (Installed OR VS2010_IDE_VWD_PROJECTSYSTEM_INSTALLED OR VS2012_IDE_VWD_PROJECTSYSTEM_INSTALLED)]]>
   </Show>
</InstallUISequence>

Installer should warn user that Visual Studio 2010 or 2012 better be installed on the machine before installing.

like image 167
Taras Kozubski Avatar answered Dec 04 '22 03:12

Taras Kozubski