[wix-users] Copy a file from SourceDir

Greg Olone Greg.Olone at cellebrite.com
Fri Dec 16 09:46:18 PST 2022

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.

More information about the wix-users mailing list