C# Wix自定义BA安装程序WPF安装完成后启动应用程序

C# Wix自定义BA安装程序WPF安装完成后启动应用程序,c#,wix,wix3.9,C#,Wix,Wix3.9,我已经使用WIX和WPF项目创建了一个自定义安装程序。 我正在尝试在安装程序成功完成后启动应用程序。 当我使用Process.Start(AppPath)时;它不会从指定路径中删除文件,而是使用临时文件中的路径。 在常见情况下,使用 <Variable Name="LaunchTarget" Value="[InstallFolder]\pCloud Drive\pCloud.exe"/> if (LaunchApp) { ProcessStartInfo exeFile

我已经使用WIX和WPF项目创建了一个自定义安装程序。 我正在尝试在安装程序成功完成后启动应用程序。 当我使用Process.Start(AppPath)时;它不会从指定路径中删除文件,而是使用临时文件中的路径。 在常见情况下,使用

<Variable Name="LaunchTarget" Value="[InstallFolder]\pCloud Drive\pCloud.exe"/>
if (LaunchApp)
{
    ProcessStartInfo exeFile = new ProcessStartInfo(this.AppPath);
    Process.Start(exeFile);
}

///don't call Environment.Exit. The BA is a guest in the process, Bootstrapper.Engine.Quit is how you tell Burn that you're done. Burn will call ExitProcess from there.
WixBootstrapper.BootstrapperDispatcher.InvokeShutdown();