WiX:将快捷方式安装为功能

时间:2017-08-10 17:02:18

标签: wix windows-installer

我正在尝试构建一个安装程序,在选择某个功能时安装快捷方式。

这就是我到目前为止所做的,并没有做到这一点......

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="GUID-1785-41F7-B845-08812B091FA2" Name="Auction OS" Language="1033" Version="1.0.0.0" Manufacturer="Company" UpgradeCode="GUID-3626-482F-ACFC-721551EBA9F8">
        <Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Description="The Installation Package" Comments="Copyright Company" />

        <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
        <Media Id="1" EmbedCab="yes" Cabinet="n.cab" />

        <Feature Id="FullProduct" Title="Full Setup" Level="1">
            <ComponentGroupRef Id="AOSComponents" />
        <Feature Id="accounting_feat" Title="Accounting Type" Description="Accounting SQL queries." Display="expand" Level="1">

        </Feature>
        <Feature Id="email_bos_sc_feat" Title="Email BOS Shortcut" Description="A RunJob application service which automatically e-mails bills of sale to buyers." Display="expand" Level="1">
          <ComponentRef Id="email_bos_sc_comp"/>
        </Feature>
        <Feature Id="block_print_sc_feat" Title="Block Print Shortcut" Description="A RunJob application service which prints bills of sale on the block." Display="expand" Level="1">
          <ComponentRef Id="block_print_sc_comp"/>
        </Feature>
        <Feature Id="dealer_kiosk_sc_feat" Title="Dealer Kiosk Shortcut" Description="A kiosk application which allows dealers to print their own bidder badges and gate passes." Display="expand" Level="1">
          <ComponentRef Id="dealer_kiosk_sc_comp"/>
        </Feature>
    </Feature>

    <UIRef Id="WixUI_Mondo" />
    <UIRef Id="WixUI_ErrorProgressText" />
</Product>

<Fragment>
    <DirectoryRef Id="DesktopFolder">
      <Component Id="email_bos_sc_comp" Guid="GUID-DE67-40FF-81BE-80310D3B9CC8">
        <Shortcut Id="emailbosLNKdesktop" WorkingDirectory="INSTALLFOLDER" Name="AOS Email BOS" Target="emailbosBAT" Icon="auctionedge_icon" IconIndex="0" Directory="DesktopFolder" Description="A RunJob application service which automatically e-mails bills of sale to buyers."/>
        <RegistryValue Root="HKCU" Key="Software\AOS\email_bos_sc" Name="installed" Type="integer" Value="1" KeyPath="yes" />
      </Component>
      <Component Id="block_print_sc_comp" Guid="GUID-AD89-4D19-B186-7674F1DD6F99">
        <Shortcut Id="blockprintLNKdesktop" WorkingDirectory="INSTALLFOLDER" Name="AOS Block Print" Target="blockprintBAT" Icon="auctionedge_icon" IconIndex="0" Directory="DesktopFolder" Description="A RunJob application service which prints bills of sale on the block." />
        <RegistryValue Root="HKCU" Key="Software\AOS\block_print_sc" Name="installed" Type="integer" Value="1" KeyPath="yes" />
      </Component>
      <Component Id="dealer_kiosk_sc_comp" Guid="GUID-AD03-44E5-BB86-6C0BF2A1FE7A">
        <Shortcut Id="dealerkioskLNKdesktop" WorkingDirectory="INSTALLFOLDER" Name="AOS Dealer Kiosk" Target="dealerkioskBAT" Icon="auctionedge_icon" IconIndex="0" Directory="DesktopFolder" Description="A kiosk application which allows dealers to print their own bidder badges and gate passes." />
        <RegistryValue Root="HKCU" Key="Software\AOS\dealer_kiosk_sc" Name="installed" Type="integer" Value="1" KeyPath="yes" />
      </Component>
    </DirectoryRef>
  </Fragment>

如何实现“如果选择此功能,则创建此安装程序在桌面上安装的文件的快捷方式”?

另外,如果我可以避免它,我不想安装注册表项。我只想要一个基于条件的快捷方式...似乎比它应该更难......

0 个答案:

没有答案