[wix-users] Copy a file from SourceDir

Greg Olone Greg.Olone at cellebrite.com
Fri Dec 16 09:49:02 PST 2022


I should have mentioned, here’s the config of the search I’m doing:

<Property Id="PROVIDED_CONFIG_FILE">
                <DirectorySearch Path="[SourceDir]" Depth="0" AssignToProperty="no" Id="SourceDirSearch" >
                                <FileSearch Name="config.json" Id="configSearch" />
                </DirectorySearch>
</Property>

Greg

From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Greg Olone via wix-users <wix-users at lists.wixtoolset.org>
Date: Friday, December 16, 2022 at 12:47 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Greg Olone <Greg.Olone at cellebrite.com>
Subject: [wix-users] Copy a file from SourceDir
I have a need to copy a configuration file from the directory where the msi file lives to a location within the TargetDir and can’t quite figure this out.

I’ve tried using a CustomAction but I keep getting a linking error that says it needs to be done before CostFinalize because the parameters I’m creating contain a directory (in this case [SourceDir]) moving the action to before that causes other problems.

So then I tried using a CopyFile, but it seems I can’t refer to something from outside the target directory tree.

…and then I tried using a FileSearch contained In a DirectorySearch and I’m back to the error about CostFinalize:

ConfigTemplate.wxs(168) : error LGHT0204 : ICE12: CustomAction: setAgentDir is of type: 51 referring to a Directory. Therefore it must come before CostFinalize @ 1000 in Seq Table: InstallExecuteSequence. CA Seq#: 4007
Link Error: 204

Could someone tell me the right way to do this?


Greg O’Lone

This e-mail and the information it contains may be privileged and/or confidential. It is intended solely for the use of the named recipient(s). If you are not the intended recipient you may not disclose, copy, distribute or retain any part of this message or attachments. If you have received this e-mail in error please notify the sender immediately [by clicking 'Reply'] and delete this e-mail.

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://protect2.fireeye.com/v1/url?k=31323334-501d5122-3134ce07-454445555731-8ff12dcdb1133e05&q=1&e=a37c46cc-2ec0-47e3-bc6b-f6879d8d79f4&u=http%3A%2F%2Fwww.firegiant.com%2F
This e-mail and the information it contains may be privileged and/or confidential. It is intended solely for the use of the named recipient(s). If you are not the intended recipient you may not disclose, copy, distribute or retain any part of this message or attachments. If you have received this e-mail in error please notify the sender immediately [by clicking 'Reply'] and delete this e-mail.


More information about the wix-users mailing list