I'm developing a Custom Action to install the same file into multiple folders(that are determined at runtime).
The custom action resides inside a Wix C# Custom Action Project. It's code looks like this:
public class CustomActions
{
[CustomAction]
public static ActionResult InstallToTrunks(Session session)
{
// some logic
}
}
The relevant WIX markup looks like this:
<Binary Id='CustomActions' SourceFile='..\CustomActions\bin\$(var.Configuration)\CustomActions.dll' />
<CustomAction Id='InstallToTrunks' BinaryKey='CustomActions' DllEntry='InstallToTrunks' Execute='deferred' Return='check'/>
<InstallExecuteSequence>
<Custom Action='InstallToTrunks' After='InstallInitialize'></Custom>
</InstallExecuteSequence>
However, when I try to run the setup, it fails, and log says: CustomAction InstallToTrunks returned actual error code 1154 (note this may not be 100% accurate if translation happened inside sandbox)
Any help would be very welcome. Alternatively, if you have a suggestion on how to achieve what I'm trying to do(install same file into multiple folders that can be determined only at retuntime) without CustomActions, that would be helpful too.
Thanks.