I am preparing installation packages for a plugin which replace some files of other application. I need make a backup of that files, so I prepared CustomAction which will do that.
How can I pass as argument to my custom action locations of all files which will be copied during installation? Do I need to make that list manually?
Instead of creating a custom action, why not use the WiX CopyFile element to back up those files.
You can pass parameters to custom actions by setting properties in your installer. Then access those properties in your custom action like so (C# example):
[CustomAction]
public static ActionResult DoWork(Session session)
{
session.Log("Begin DoWork");
string propertyValue = session["PROPERTYNAME"];
//...
}