One thing to notice here is that I am using new EnsureTable element.  WiX does not create standard tables if they are empty.  Because we don't have anywhere in our WiX code RemoveFile elements WiX will not create RemoveFile table.  HavingEnsureTable element tells to WiX compiler that RemoveFile table must be created even though it is empty.

In Part 2 we will try to make this custom action reusable.

Code is attached.

 The Art of Custom Actions1.zip