Wix 如何使用burn';s在安装完成后启动提升流程的新功能?

Wix 如何使用burn';s在安装完成后启动提升流程的新功能?,wix,burn,elevated-privileges,Wix,Burn,Elevated Privileges,当前关于如何使用的样本集非常稀疏(如果存在的话)。从WIP和中可以看出,我至少需要以下内容: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"> <Bundle Name="..." Version=

当前关于如何使用的样本集非常稀疏(如果存在的话)。从WIP和中可以看出,我至少需要以下内容:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
    <Bundle Name="..." Version="1.0.0.0" Manufacturer="..." UpgradeCode="*">
      <BootstrapperApplicationRef 
           Id="WixStandardBootstrapperApplication.RtfLicense">
        <bal:WixStandardBootstrapperApplication 
           LaunchTargetElevatedId="LaunchElevatedInstallProc" 
           LaunchArguments="/myarg=1" 
           LicenseFile="license.rtf" />
      </BootstrapperApplicationRef>

      <ApprovedExeForElevation 
          Id="LaunchElevatedInstallProc" 
          Key="SOFTWARE\Company\Product" 
          Value="PathToExeDeliveredByMSI" />

      <Chain>
        <MsiPackage SourceFile="Setup.msi" Compressed="yes" />
      </Chain>
   </Bundle>
 </Wix>
然而,这似乎并不奏效。My.exe从未启动,.log文件没有提供任何信息,说明它甚至试图启动它

这个代码缺少什么

编辑

日志提供的唯一信息是它正在设置变量:

正在将字符串变量“LaunchTargetLevateId”初始化为值“LaunchLevateInstallProc”
正在将字符串变量“LaunchArguments”初始化为值“/s”

根据,还必须设置
WixStandardBootstrapperApplication
上的
TargetPath
属性。如果试图启动exe时出现任何错误,WixStdBA会返回到在未提升的路径上启动exe

Id of the target ApprovedExeForElevation element.
If set with LaunchTarget, WixStdBA will launch the application
through the Engine's LaunchApprovedExe method instead of through ShellExecute.
您还需要在
Success
页面上的一个按钮,其名称为
LaunchButton

Id of the target ApprovedExeForElevation element.
If set with LaunchTarget, WixStdBA will launch the application
through the Engine's LaunchApprovedExe method instead of through ShellExecute.