[wix-users] Selecting target drive and automatically appending path
Matsumura Risa (AA-AS/EOS32)
Risa.Matsumura at uk.bosch.com
Mon Jun 13 03:01:37 PDT 2016
Hi,
I want to have a dialog where users can change the target drive using VolumeSelectCombo.
When they select the drive from the combo, the rest of the path will be appended, updated and displayed in a PathEdit field (eg. Program Files (x86)\Company name\Application name). I don't want the PathEdit to be editable as the appended path is defined by us.
And if you proceed the installation steps, the package will be installed in the appropriate place at the end.
I can select a drive and install in the selected drive but only to the root of the drive. I'm struggling to append the rest of the path (eg. Program Files (x86)\Company name\Application name) so that it installs in the correct target folder.
I got:
<Property Id="INSTALLATION_DIR" Value="TARGETDIR" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="CompanyFolder" Name="$(var.Company)">
<Directory Id="APPLICATIONFOLDER" Name="$(var.ApplicationFolder)">
</Directory>
</Directory>
</Directory>
</Directory>
And here are my VolumeSelectCombo and PathEdit:
<Control Id="InstallDirCombo" Type="VolumeSelectCombo" Property="INSTALLATION_DIR" Fixed="yes" Indirect="yes" X="45" Y="90" Width="100" Height="15" >
<Publish Event="SetTargetPath" Value="[INSTALLATION_DIR]">1</Publish>
</Control>
<Control Id="InstallPath" Type="PathEdit" Property="APPLICATIONFOLDER" Disabled="yes" Width="300" Height="15" X="45" Y="185" >
</Control>
Any help appreciated.
Thanks.
More information about the wix-users
mailing list