广告快捷方式不在wix中显示

时间:2016-08-10 13:21:31

标签: wix windows-installer

我有一个广告快捷方式,如下所示

 <Component Id="comp1" Guid="{0EB394A2-1D7B-44A0-A85A-EC17E2816BDD}" KeyPath="yes">

    <Shortcut Id="Shortcut1" Directory="MyDir" Name="OfficeForms" ShortName="off~1" Description="officeformdesigns" Arguments="Filename.exe /x param" Icon="Icon.ico"  WorkingDirectory="FormDir" Advertise="yes"/>
  </Component>

但安装程序安装完成后,此快捷方式未显示。当我没有给出“广告”属性快捷方式显示但它只是打开我的[INSTALLDIR]文件夹而不是“Filename.exe / x param”

此外,我正在进行ICE验证,如下所示。

错误90 ICE50:组件'comp1'具有通告的快捷方式,但是为空KeyPath。

1 个答案:

答案 0 :(得分:4)

广告快捷方式应该(必须?)嵌套在<File>(快捷方式应该启动的目标)下,这是组件的关键路径。

例如

<Component Id="comp1" Guid="{0EB394A2-1D7B-44A0-A85A-EC17E2816BDD}" >
  <File Id="File.exe" KeyPath="yes" Source="$(var.binDir)File.exe">
    <Shortcut Id="Shortcut1" Directory="MyDir" Name="OfficeForms" ShortName="off~1" Description="officeformdesigns" Arguments="/x param" Icon="Icon.ico"  WorkingDirectory="FormDir" Advertise="yes"/>
  </File>
</Component>