wix - 快捷方式图标

标签 wix installation

你能告诉我,我的代码有什么问题吗?

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" xmlns:html="http://www.w3.org/1999/xhtml">
    <Product Id="c1ee1e1f-4e2a-41c6-a716-eb6f79477012" Name="AdministKOB" Language="1033" Version="1.0.0.0" Manufacturer="Project UP" UpgradeCode="909b9926-711d-4a97-887b-df0bafc6ea66">
        <Package InstallerVersion="200" Compressed="yes" />
        <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

      <Icon Id="ikonka" SourceFile="Files\AdministKOB.exe"/>

      <Directory Id="TARGETDIR" Name="SourceDir">
          <Directory Id="DesktopFolder"/>
            <Directory Id="ProgramMenuFolder">
          </Directory>

          <Directory Id="ProgramFilesFolder">
                <Directory Id="INSTALLLOCATION" Name="Administ_KOB">
                    <Component Id="ProductComponent" Guid="6bd37582-5219-4ae4-a56e-cd1ecd375efa">
                      <File Id="AdministKOB" Name="AdministKOB.exe" Source="Files\AdministKOB.exe" KeyPath="yes">
                        <Shortcut Advertise="yes"
                                      Id="DesktopShortcut"
                                      Directory="DesktopFolder"
                                      Name="AdministKOB"
                                      WorkingDirectory="INSTALLDIR"
                                      Description="Elektroniczna ksiazka budynku"
                                      Icon ="ikonka">
                        </Shortcut>
                      </File>
                      <!--<File Id="ikonka" Name="C.ico" DiskId="1"  Source="City.ico" Vital="yes" />-->
                    </Component>
                </Directory>
            </Directory>
        </Directory>

        <Feature Id="ProductFeature" Title="AdministKOB" Level="1">
            <ComponentRef Id="ProductComponent" />
        </Feature>
        <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
    </Product>
</Wix>

我收到此错误和警告:

The extension of Icon 'ikonka' for Shortcut 'DesktopShortcut' is not "exe" or "ico". The Icon will not be displayed correctly.*

为什么?我给了ICO文件。

The extension of Icon 'ikonka' for Shortcut 'DesktopShortcut' does not match the extension of the Key File for component 'ProductComponent'.

你有什么想法吗?

最佳答案

您似乎缺少 Icon 元素......例如

    <Icon Id="City.ico" SourceFile="City.ico" />
    <Component ...>
        <File ...>
            <Shortcut Advertise="yes"
                Id="DesktopShortcut"
                Directory="DesktopFolder"
                Name="AdministKOB"
                WorkingDirectory="INSTALLDIR"
                Description="Elektroniczna książka budynku"
                Icon ="City.ico" />
        </File>
    </Component>

关于wix - 快捷方式图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2884453/

相关文章:

wix - 如何找到用于以编程方式卸载的 Wix Burn 可执行文件的 GUID?

user-interface - 多个目标目录的 WIX UI

wix - 是否有适用于 WiX 的 gradle 插件?

database - WiX:数据库卸载

orm - 为什么即使在使用包管理器控制台安装 EntityFramework 后,EntityFramework 命名空间仍未定义?

installation - 是否可以根据属性使安装(MSI)的发布者(制造商)是动态的

windows - Wix - 卸载不同的产品

.net - 为所有用户添加一个键到 HKEY_CURRENT_USER

django - 需要帮助安装django-cms

python - rpy2 在 debian 上安装问题