1
votes

I've developed a Wix control that lets me select from various drives that are installed on my machine. I've pasted the code in below.

I have two questions: 1) How do I pop up a dialog box shows my drive selection? 2) How do I use the drive selection to determine where to install my app? Note: if its on the C Drive, I want it installed to program files, else Drive:\Company\Product.

Any help would be appreciated. I apologize if this was covered elsewhere online. I couldn't find a clear cut solution online.

My control code is as follows:

    <Control Id="myVolumeSelectCombo" Type="VolumeSelectCombo" Property="TARGETDIR2" Fixed="yes" Remote="yes" X="10" Y="100" Width="100" Height="17">
      <Publish Property="INSTALLLOCATION" Value="[TARGETDIR2]Company\Product\" Order="1"><![CDATA[TARGETDIR2 = "C:\"]]></Publish>
      <Publish Property ="INSTALLLOCATION" Value="[TARGETDIR2]Company\Product\" Order="2"><![CDATA[TARGETDIR2 <> "C:\"]]></Publish>
      <Publish Event="SetTargetPath" Value="INSTALLLOCATION" Order="3"></Publish>
    </Control>
1

1 Answers