Add a component like this to fix ICE64.  <RemoveFolder> adds the required
RemoveFile table entry. The registry value just provides a keypath for the
component.

  <Component Id="RemoveShortcutDir">
    <RemoveFolder Id="RemoveShortcutDir" Directory="myStartDir "
On="uninstall" />
    <RegistryValue Root="HKMU" Key="Software\WIndustries\Installer"
Name="RemoveShortcutDir" Value="keypath" KeyPath="yes" Type="string" />
  </Component>      

To fix icon bloat, you extract an ico file from the exe and reference that in
the shortcut instead. The reason is that if you advertise a shortcut with an
icon that's in an exe, the whole exe is copied to provide an icon file in the
start menu, even though the rest of the installation hasn't been installed
yet.

If you get any more ICE errors, it's worth searching for the ICE error code
in this list or elsewhere. These things tend to crop up often.

Hope that helps.

-----Original Message-----
From: Wilson, Brian [mailto:brian.wil...@dhr.alabama.gov] 
Sent: 23 March 2011 20:42
To: 'wix-users@lists.sourceforge.net'
Subject: [WiX-users] First attempt at using WiX is not going good.

Good Afternoon,

I am trying to create an installer that will install an application that can
be used by any user of the PC.  It will also create a Start menu shortcut and
a Desktop shortcut, for all users.  I am running WiX 3.5 with Visual Studio
2010 on a Windows 7 machine.  I am using heat on two different directories to
generate fragments.  I am using a XSLT against one of the fragments to insert
the shortcuts into the fragment.  I am running all the steps from NAnt, if
that makes a difference.

Here is the XSL file:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi";>
        <xsl:output method="xml" indent="yes" version="1.0" encoding="utf-8"
/>

        <xsl:template match="node() | @*">
                <xsl:copy>
                        <xsl:apply-templates select="@* | node()" />
                </xsl:copy>
        </xsl:template>

        <xsl:template
match="wix:File[@Source='!(wix.ImportSrc)\Import.exe']">
                <xsl:copy>
                        <xsl:apply-templates select="@* | node()" />
                        <xsl:text>&#10;&#9;&#9;&#9;&#9;&#9;</xsl:text>
                        <xsl:element name="Shortcut"
use-attribute-sets="StartMenu-Shortcut"
namespace="http://schemas.microsoft.com/wix/2006/wi"; />
                        <xsl:text>&#10;&#9;&#9;&#9;&#9;&#9;</xsl:text>
                        <xsl:element name="Shortcut"
use-attribute-sets="Desktop-Shortcut"
namespace="http://schemas.microsoft.com/wix/2006/wi"; />
                        <xsl:text>&#10;&#9;&#9;&#9;&#9;</xsl:text>
                </xsl:copy>
        </xsl:template>

        <xsl:attribute-set name="StartMenu-Shortcut">
                <xsl:attribute name="Id">startmenuImport</xsl:attribute>
                <xsl:attribute name="Directory">myStartDir</xsl:attribute>
                <xsl:attribute name="Name">Import</xsl:attribute>
                <xsl:attribute
name="WorkingDirectory">INSTALLLOCATION</xsl:attribute>
                <xsl:attribute name="Icon">icnImport</xsl:attribute>
                <xsl:attribute name="IconIndex">0</xsl:attribute>
                <xsl:attribute name="Advertise">yes</xsl:attribute>
        </xsl:attribute-set>

        <xsl:attribute-set name="Desktop-Shortcut">
                <xsl:attribute name="Id">desktopImport</xsl:attribute>
                <xsl:attribute name="Directory">DesktopFolder</xsl:attribute>
                <xsl:attribute name="Name">Import</xsl:attribute>
                <xsl:attribute
name="WorkingDirectory">INSTALLLOCATION</xsl:attribute>
                <xsl:attribute name="Icon">icnImport</xsl:attribute>
                <xsl:attribute name="IconIndex">0</xsl:attribute>
                <xsl:attribute name="Advertise">yes</xsl:attribute>
        </xsl:attribute-set>
</xsl:stylesheet>

Here is my MSI.wxs that calls the fragments:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
        <Product Id="*" Name="Import.Installer" Language="1033"
Version="1.2.3.4" Manufacturer="W Industries" UpgradeCode="MY_GUID">
                
                <Package Id="*" InstallerVersion="310" Compressed="yes"
Description=" Import and Protocol Installer" Manufacturer=" W Industries "
InstallScope="perMachine" Platform="x86" InstallPrivileges="elevated" />
                
                <Media Id="1" Cabinet="Import.cab" EmbedCab="yes"
CompressionLevel="high" />
                
                <Directory Id="TARGETDIR" Name="SourceDir">
                        <Directory Id="ProgramFilesFolder">
                                <Directory Id="MyRoot" Name=" W Industries ">
                                        <Directory Id="INSTALLLOCATION"
Name=" Import">
                                                <Directory Id="ProtocolDir"
Name="Protocol" />
                                        </Directory>
                                </Directory>
                        </Directory>
                        
                        <Directory Id="ProgramMenuFolder" Name="StartMenu">
                                <Directory Id="myStartDir" Name=" W
Industries "/>
                        </Directory>

                        <Directory Id="DesktopFolder" Name="Desktop" />
                </Directory>
                
                <Feature Id="ProductFeature" Title=" Import" Level="1">
                        <ComponentGroupRef Id="cgImport" />
                        <ComponentGroupRef Id="cgProtocol" />
                </Feature>
                
                <Icon Id="icnImport" SourceFile="!(wix.ImportSrc)\Import.exe"
/>
        </Product>
</Wix>

I am getting the following errors from light:
[light] C:\MyWiX\Scripts\MSI.wxs(42) : error LGHT1076 : ICE36: Icon Bloat.
Icon icnImport is not used in the Class, Shortcut, or ProgID table and also
not used for ARPPRODUCTICON property.
[light] C:\MyWiX\Scripts\MSI.wxs(19) : error LGHT0204 : ICE64: The directory
myStartDir is in the user profile but is not listed in the RemoveFile table.

I then tried adding the shortcut per:
http://wix.sourceforge.net/manual-wix3/create_start_menu_shortcut.htm and not
using the XSL file.

When I ran the compile this time and ran the resulting MSI, the Start menu
folder was named something completely different and instead of a shortcut
named Import, it was named PDF32.dll, which is one of the DLLs in the
application's directory.  The Start menu was not installed for all users and
it was not removed during the uninstall.

I am so frustrated and I am not sure what I am doing wrong.  Can anyone
please shed some light?

Brian Wilson
Programmer Analyst, Associate
Department of Human Resources
Email: brian.wil...@dhr.alabama.gov



-----------------------------------------------------------------------------
-
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to