I've got a package (written in WiX 2) that installs three shortcuts. New request is for one shortcut to be conditional on a property. How do I make it work?
I thought I'd make a new component (with condition on the component) and move the shortcut into that, but that was too simplistic and I don't know what KeyPath to use. I get "ICE50 ERROR Component 'GuiDesktopIcon' has an advertised shortcut, but a null KeyPath" and the shortcut never installs. But KeyPath="no" candle gives WiX err 118, and Advertized="no" gets validation failure "ICE43 ERROR Component GuiDesktopIcon has non-advertised shortcuts. It should use a registry key under HKCU as its KeyPath, not a file" and "ICE57 ERROR Component 'GuiDesktopIcon' has both per-user and per-machine data with a per-machine KeyPath." Is there a better way or can this easily be fixed? Here's my naive attempt: <DirectoryRef Id="INSTALLDIR"> <Component Id="EGHelper" Guid="{53AE3744-C9AC-4DCB-A34B-CAA5803FCE1B}" DiskId="1" Win64="$(env.MSI_WIN64)"> <File Id="EGHelper" Name="WSCMgr.exe" LongName="MyAppUI.exe" KeyPath="yes" Checksum="yes" Vital="yes" ReadOnly="no" Hidden="no" System="no" Source="..\..\windows_client_gui\MyAppUI.exe"> </File> <Shortcut Id="EGMgrPMenu" Name="ConfWSPM" LongName="Application" Directory="PMenuData" WorkingDirectory="INSTALLDIR" Advertise="yes" Icon="Icon.exe"/> <Shortcut Id="EGMgrStartup" Name="ConfWSSU" LongName="Application" Directory="StartupFolder" WorkingDirectory="INSTALLDIR" Advertise="yes" Icon="Icon.exe"/> <RemoveFolder Id="RemoveData" Directory="PMenuData" On="uninstall"/> </Component> <Component Id="GuiDesktopIcon" Guid="{E286D21E-A439-4627-ABA3-EB094D65F82A}" DiskId="1" Win64="$(env.MSI_WIN64)" KeyPath="yes" > <Shortcut Id="EGMgrDesktop" Name="ConfWSDT" LongName="Application" Directory="DesktopFolder" WorkingDirectory="INSTALLDIR" Advertise="yes" Icon="Icon.exe"/> <Condition> PUTDESKTOPICON </Condition> </Component> </DirectoryRef> In the working code the EGMgrDesktop shortcut is in the EGHelper component, and there is no GuiDesktopIcon component. Thanks for any advice. ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users