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

Reply via email to