Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wix设置中的警告_Wix_Installation_Windows Installer_Wix3.7 - Fatal编程技术网

Wix设置中的警告

Wix设置中的警告,wix,installation,windows-installer,wix3.7,Wix,Installation,Windows Installer,Wix3.7,我是Wix工具包的新手。我正在使用Wix工具包为我的应用程序创建一个设置。 但是当我尝试使用Wix构建它时。它显示了这个警告 C:\Users\BNK\Desktop\wix-popup\setup.wxs(60):警告LGHT1076: ICE69:不匹配的组件引用。条目“FCONStartMenuShortcut” 快捷方式表b的长度为组件“FCONShortcut”。然而, 列“Tar get”中的格式化字符串引用了文件 “FCONUCClient.exe”,它属于组件“FCONUCCli

我是Wix工具包的新手。我正在使用Wix工具包为我的应用程序创建一个设置。 但是当我尝试使用Wix构建它时。它显示了这个警告

C:\Users\BNK\Desktop\wix-popup\setup.wxs(60):警告LGHT1076: ICE69:不匹配的组件引用。条目“FCONStartMenuShortcut” 快捷方式表b的长度为组件“FCONShortcut”。然而, 列“Tar get”中的格式化字符串引用了文件 “FCONUCClient.exe”,它属于组件“FCONUCClient.exe”。 组件位于同一特征中

有人能告诉我我的代码出了什么问题吗? 这是Wix设置代码

<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi' >

  <Product Name='FCON UC Client 1.0.9' Id='PUT-GUID-HERE' 
          UpgradeCode='PUT-GUID-HERE'
          Language="'1033'" Codepage='1252' Version='1.0.9' 
          Manufacturer='BNK Systems JLT' >
    <!-- Product Info-->

    <Package Id='*' Keywords='Installer' Description="FCON UC Client 1.0.9"
      Comments='All Rights Reserved BNK Systems JLT.' 
      Manufacturer='BNK Systems JLT' InstallerVersion='100' Languages='1033'
      Compressed='yes' SummaryCodepage='1252' />
    <!-- Package Info-->
    <Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt='CD-ROM #1' />
    <!-- Setup is CDROM Installer Package-->
    <Property Id='DiskPrompt' 
              Value="BNK Systems JLT FCON UC Client Installation" />
    <!-- Definition for DiskPrompt used in Media above -->

    <Directory Id="TARGETDIR" Name="SourceDir">
      <!--  Directory Structure Root -->
      <Directory Id="ProgramFilesFolder">
        <!-- Install the Package in Program Files Folder -->
        <Directory Id="APPLICATIONROOTDIRECTORY" Name="BNK Systems">
          <!-- Create a Folder namely BNK Systems  inside Program Files ; Id APPLICATIONROOTDIRECTORY can be defined later-->
          <Directory Id="APPLICATIONFILEDIRECTORY" Name="FCON UC Client">
            <!-- Create a Folder namely FCON UC Client inside BNK Systems; Id APPLICATIONFILEDIRECTORY can be defined later -->

          </Directory>
        </Directory>
      </Directory>

      <Directory Id="ProgramMenuFolder">
        <!-- Program Files StartMenu Folder-->
        <Directory Id="FCONStartMenuFolder" Name="BNK Systems"/>
      </Directory>
    </Directory>

    <DirectoryRef Id="APPLICATIONFILEDIRECTORY">
      <!-- Definition of Directory APPLICATIONFILEDIRECTORY  -->
      <Component Id="FCONUCClient.exe" Guid="*">
        <!-- Application files & settings to be installed goes here-->
        <File Source="FCON UC Client.exe" KeyPath="yes" Checksum="yes"/>
        <File Source="Asterisk.NET.dll" />
        <File Source="Dotnetrix.TabControl.dll" />
        <File Source="FCON UC Client.exe.manifest" />
        <File Source="jabber-net.dll" />
        <File Source="muzzle.dll" />
        <File Source="netlib.Dns.dll" />
        <File Source="zlib.net.dll" />
        <File Source="inittrial.exe" />
     </Component>
    </DirectoryRef>

    <DirectoryRef Id="FCONStartMenuFolder">
      <Component Id="FCONShortcut" Guid="*">
        <Shortcut Id="FCONStartMenuShortcut"
                     Name="FCON UC Client 1.0.9"
                   Description="FCON UC Client 1.0.9"
                    Target="[#FCONUCClient.exe]"
                          WorkingDirectory="APPLICATIONFILEDIRECTORY"/>
       <RemoveFolder Id="FCONStartMenuFolder" On="uninstall"/>

       <RegistryValue Root="HKCU" Key="Software\Microsoft\FCONUCClient" 
                      Name="installed" Type="integer" Value="1" KeyPath="yes"/>

      </Component>
    </DirectoryRef>

    <!-- Step 3: Tell WiX to install the files -->
    <Feature Id="InstallFCON" Title="FCON UC Client 1.0.9" Level="1">
      <ComponentRef Id="FCONUCClient.exe" />
      <!--<ComponentRef Id="documentation.html" />-->
      <ComponentRef Id="FCONShortcut" />
    </Feature>

  </Product>
</Wix>

一些经验建议

  • 每个组件使用一个文件,这样可以避免各种问题(例外:多文件.net程序集应放在一个组件中。也可能有其他例外,但作为一般规则:每个组件一个文件)
  • 将快捷方式添加到它们引用的文件所在的同一组件在您的情况下,这意味着将FCONStartMenuShortcut移动到FCONUCClient.exe组件。
  • 仅检查每个组件的密钥文件,以确定是否应安装整个组件。当您在同一组件中放置多个文件时,这意味着如果密钥文件未升级,则升级中不会更新任何文件。这违反了Microsoft的最佳实践规则(组件规则)
请浏览这些网站,以帮助您评估技术:

  • (很好的基于代码的一个,让“修补匠”有一个良好的开端)

嗨,我试过你的建议了。第一,没有任何区别的警告。。。在第二个示例中,我有一些疑问,如果我将快捷方式移动到应用程序文件组件,快捷方式将放置在哪里?我希望它出现在“开始”菜单中,谢谢。您需要为快捷方式元素添加“目录”属性,并指定快捷方式的位置。请参阅:好的,我使用directory在startmenu中创建目录,并使用directory属性指定快捷方式中的路径,对吗?快捷方式将实际指向目标。尝试在WiX二进制文件文件夹中搜索WiX.chm。搜索快捷方式元素,您应该可以轻松访问所需的属性信息