code_junkie

How do I create a conditional property in Wix (Almost like an If-Then)

Nov 13th, 2011
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. <Feature Id='MainProgram' Title='MainExe' Description='This application stores and displays information from our hardware.'
  2. ConfigurableDirectory='INSTALLDIR' Level='4'
  3. AllowAdvertise='no'>
  4. <ComponentRef Id='MainExecutable' />
  5. <ComponentRef Id='SQLLibrary' />
  6. <ComponentRef Id='ProgramIcon' />
  7. <ComponentRef Id='RemovePluginsFolder'/>
  8. <Property Id='ShowFinalCheckbox'>1</Property> #<--This won't work, but I'd like it to.
  9. </Feature>
  10.  
  11. <SetProperty Id="ShowFinalCheckBox" Value="1" After="CostFinalize">?MainExecutableComponent>2 OR $MainExecutableComponent>2</SetProperty>
  12.  
  13. <Dialog Id="ExitDlg" Width="370" Height="270" Title="[ProductName] [Setup]" NoMinimize="yes">
  14. <Control Id="Finish" Type="PushButton" X="236" Y="243" Width="56" Height="17"
  15. Default="yes" Cancel="yes" Text="Finish">
  16. <Publish Event="EndDialog" Value="Return">1</Publish>
  17. <Publish Event="DoAction" Value="LaunchFile">(NOT Installed) AND (LAUNCHPRODUCT = 1) AND (&MainExecutable = 3)</Publish>
  18. </Control>
  19. <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Disabled="yes" Text="Cancel" />
  20. <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="[DialogBitmap]" />
  21. <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Disabled="yes" Text="Back" />
  22. <Control Id="Description" Type="Text" X="135" Y="70" Width="220" Height="20" Transparent="yes" NoPrefix="yes">
  23. <Text>Click the Finish button to exit the Wizard.</Text>
  24. </Control>
  25. <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
  26. <Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes">
  27. <Text>{VerdanaBold13}Completing the [ProductName] Wizard</Text>
  28. </Control>
  29. <Control Id="Launch" Type="CheckBox" X="135" Y="120" Width="150" Height="17"
  30. Property="LAUNCHPRODUCT" CheckBoxValue="1">
  31. <Text>Launch [ProductName]</Text>
  32. <Condition Action="hide">
  33. NOT (&MainProgramFeature = 3)
  34. </Condition>
  35. </Control>
  36. </Dialog>
Add Comment
Please, Sign In to add comment