Hi,

Thanks for your reply. A transform in this my would be too complicated - I
run my wix builds based on conditions set in environment variables, so I
would need a conditional transform. I am not saying it is impossible to do,
but since heat is run from the wixproj by votive, solving it like that
would give me some extra headache. Not to mention that I am not very
familiar with xslt.

However, I have found another solution that works: instead of using
TargetFile, I use TargetProperty.
<Property Id='FileAssociationProperty'
Value="[BINLOCATION]\$(env.MAIN_EXECUTABLE)"/>
...
<Verb Command="Open" Id="open" TargetProperty="FileAssociationProperty"
Argument="%1" />

In this case I do not need to use a File tag, and I can avoid the component
reference counting error.

Peter

On Mon, Nov 21, 2011 at 5:49 PM, Blair <os...@live.com> wrote:

> Add a transform to heat's commandline that adds the Verb.
>
> -----Original Message-----
> From: Peter Bulyaki [mailto:peter.buly...@gmail.com]
> Sent: Monday, November 21, 2011 8:27 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: [WiX-users] Problem with file association and harvesting files
>
> Hi,
>
> I have a project in which all files are harvested recursively from a single
> source folder. I would also like to add a file association to this project
> as below:
>
>        <Component Id='FileAssociation' Guid="*">
>            <File Id="AssociatedExecutable"
>                Name="$(env.MAIN_EXECUTABLE)"
>                Source="$(env.SOURCEDIR_PROG)\bin\$(env.MAIN_EXECUTABLE)"
>                KeyPath="yes"/>
>            <ProgId Id="$(env.MAIN_EXECUTABLE)"
> Description="$(env.DESCRIPTION) files" Advertise="no" >
>                <Extension Id="$(env.FILEASSOCIATION)"
> ContentType="application/$(env.FILEASSOCIATION)" Advertise="no" >
>                    <Verb Command="Open" Id="open"
> TargetFile="AssociatedExecutable" Argument="%1" />
>                </Extension>
>            </ProgId>
>        </Component>
>
>
> The problem with this is that the file referenced as $(env.MAIN_EXECUTABLE)
> has already been harvested by heat, and there is already a File element
> pointing to it. So I get the following error:
>
> error LGHT0204: ICE30: The target file '.....' is installed in
> '[ProgramFilesFolder]\....\....\bin\' by two different components on an LFN
> system: 'FileAssociation' and 'cmpEC461 517D65363F29020E8A217A316F4'. This
> breaks component reference counting.
>
> Is there any other way to tell the Verb element which file we are talking
> about?
>
> Peter
>
> ----------------------------------------------------------------------------
> --
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security threats,
> fraudulent activity, and more. Splunk takes this data and makes sense of
> it.
> IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to