As far as I know,wix toolset doesn`t have any file browse control.
So I normally use c# Custom Action to do this job.
Try this sample and customize it according to your need.
using WinForms = System.Windows.Forms;
using System.IO;
using Microsoft.Deployment.WindowsInstaller;
[CustomAction]
public static ActionResult OpenFileChooser(Session session)
{
try
{
session.Log("Begin OpenFileChooser Custom Action");
var task = new Thread(() => GetFile(session));
task.SetApartmentState(ApartmentState.STA);
task.Start();
task.Join();
session.Log("End OpenFileChooser Custom Action");
}
catch (Exception ex)
{
session.Log("Exception occurred as Message: {0}\r\n StackTrace: {1}", ex.Message, ex.StackTrace);
return ActionResult.Failure;
}
return ActionResult.Success;
}
private static void GetFile(Session session)
{
var fileDialog = new WinForms.OpenFileDialog { Filter = "Text File (*.txt)|*.txt" };
if (fileDialog.ShowDialog() == WinForms.DialogResult.OK)
{
session["FILEPATH"] = fileDialog.FileName;
}
}