2
votes

Following is my code :

  <UI>     
  <Dialog Id="ExitDialog" Width="370" Height="270" Title="Exit Dialog">
    <Control Id="Exit"
             Type="PushButton"
             X="236" Y="243" Width="56" Height="17"
             Default="yes"
             Cancel="yes"
             Text="Exit">
      <Publish Event="EndDialog" Value="Return">1</Publish>
    </Control>
  </Dialog>

  <TextStyle Id="DefaultFont" FaceName="Tahoma" Size="8" />
  <Property Id="DefaultUIFont" Value="DefaultFont" />

  <InstallUISequence>
    <Show Dialog="ExitDialog" OnExit="success" />
  </InstallUISequence>

  <AdminUISequence>
    <Show Dialog="ExitDialog" OnExit="success" />
  </AdminUISequence>
</UI>

I have taken refrence from http://blogs.technet.com/b/alexshev/archive/2008/10/16/from-msi-to-wix-part-20-user-interface-required-dialog-boxes.aspx

My code gives the following error: Duplicate symbol 'Dialog:ExitDialog' found. This typically means that an Id is duplicated. Check to make sure all your identifiers of a given type (File, Component, Feature) are unique. Kindly let me know whats wrong in the above code.

2

2 Answers

0
votes

The problem is because not only does the complier pull in your custom dialog it is still also pulling in the original (from the project references), despite not actually using the latter. The duplicates involved refer to properties declared outside the "UI" block. Simply comment-out the ones in your (customised) copy, so long as they occur before the UI block.

0
votes

Change the ID of "Id="ExitDialog" into Id="ExitDialog2" for example.