I am having difficulty in understanding the concept of Custom Element of Wix. I read this and it says it is Used to sequence a custom action.
Now if you consider the follwing piece of Wix code:
<Binary Id="SetupCA" SourceFile="..\..\ext_library\SetupCA\SetupCA\bin\Release\SetupCA.CA.dll"/>
<CustomAction Id="WRITEFILETODISK" Execute="immediate" BinaryKey="SetupCA" DllEntry="WriteFileToDisk" />
<InstallExecuteSequence>
<Custom Action="WRITEFILETODISK" Sequence="2"></Custom>
</InstallExecuteSequence>
I want the Custom Action WRITEFILETODISK execute just before the MSI installs the file in my system. Even though I used Sequence=2, this is a bad way. So I must be using Before or After Attribute present in Custom tag. This website gives info on InstallExecuteSequence, but it is vague for newbie like me. Most developers uses CostInitialize, CostFinalize, InstallInitialize, InstallFinalize. So I want to know the difference between the above attributes and when to use them properly while making MSI Installer?