I was looking for list of actions and their sequence when running a WiX setup. Somehow the official website doesn\'t seem to provide any information.
The basic problem i
For registering DLLs, it is best to avoid self-registration.
We use the HEAT command to generate a WiX fragment which does the registration for us.
Use
heat file myfile.dll -o myfile.wxs
The advantage of this is that the registry entries are installed and removed correctly and there are no problems with whether the file has been installed or not at the time the registration is done.
The short answer - you should make you custom action deferred and schedule after InstallFiles (if it relies on installed file, which I think it does).
The long answer - you should get acquainted with in-script execution term. Read more about it on MSDN. When you see the InstallFiles the first time in the log file, it's when immediate actions run and deferred actions are written and scheduled to the installation script. The second time is when it actually executes (and installs files). If you make your action deferred, you'll see the same behavior for it in the log file.
This might sound not very clear, but it can't until you read more about the way it is designed to work.