Icon for shortcut

Posted by Jacek on Stack Overflow See other posts from Stack Overflow or by Jacek
Published on 2010-05-21T18:08:15Z Indexed on 2010/05/21 18:10 UTC
Read the original article Hit count: 347

Filed under:
|

Hi!

Could you tell me what is wrong in this code?? Why it doesn't work??

<?xml version="1.0" encoding="utf-8"?>

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

  <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="DesktopFolder"/>
      <Directory Id="ProgramMenuFolder">
          <!--<Directory Id="MenuStartProduct" Name="Administrator KOB"/>-->
      </Directory>

      <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLLOCATION" Name="Administ_KOB">
              <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
                <Component Id="ProductComponent" Guid="6bd37582-5219-4ae4-a56e-cd1ecd375efa">
                    <!-- TODO: Insert files, registry keys, and other resources here. -->


                  <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>
                <Component Id="ProductComponent_cfg" Guid="6bd37582-5219-4ae4-a56e-cd1ecd375efb">
                    <File Id="data.cfg" Name="data.cfg" Source="Files\data.cfg" />
                </Component>
                <Component Id="ProductComponent_dll" Guid="6bd37582-5219-4ae4-a56e-cd1ecd375efc">
                    <File Id="DB.dll" Name="DB.dll" Source="Files\DB.dll" />
                </Component>
                <Directory Id="Data">
                    <Directory Id="Data_1" Name="Data">
                        <Component Id="ProductComponent_mdf" DiskId="1" Guid="45B88917-DB08-4C4A-9DE4-D41BCE449BA5">
                            <File Id="bazaKOB.mdf" Name="bazaKOB.mdf" Source="Files\Data\bazaKOB.mdf" />
                        </Component>
                        <Component Id="ProductComponent_ldf" DiskId="1" Guid="EFEBF7C5-338C-417C-8F5B-3C3BDE46F8EB">
                            <File Id="bazaKOB_log.LDF" Name="bazaKOB_log.LDF" Source="Files\Data\bazaKOB_log.LDF" />
                        </Component>
                    </Directory>
                </Directory>
            </Directory>
        </Directory>


    </Directory>

    <Feature Id="ProductFeature" Title="AdministKOB" Level="1">
        <!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
        <ComponentRef Id="ProductComponent" />
        <ComponentRef Id="ProductComponent_cfg" />
        <ComponentRef Id="ProductComponent_dll" />
        <ComponentRef Id="ProductComponent_mdf" />
        <ComponentRef Id="ProductComponent_ldf" />
    </Feature>
    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
    <UIRef Id="WixUI_InstallDir" />
    <WixVariable Id="WixUIDialogBmp" Value="background_projectUp.bmp" />
    <WixVariable Id="WixUILicenseRtf" Value="license.rtf" />
    <UI />
</Product>

I get this error and warnings:

The extension of Icon 'ikonka' for Shortcut 'DesktopShortcut' is not "exe" or "ico". The Icon will not be displayed correctly. Why?? I give ICO file.

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

Have you any idea?? Thanks for all:) Jacek

© Stack Overflow or respective owner

Related posts about wix

Related posts about install