I don't think it is possible to pass extra parameters to the custom action method. It is called by the Windows Installer, and it seems reasonable that it expects a well-defined signature.
However, you can work it around. If you need to pass some data to the custom action, you can use the Session
object for this.
If your custom action is immediate, you can address the MSI properties in your custom action code like this:
session["PROPERTYNAME"] = "some value";
In immediate custom action the session
object can address any property from the property table.
If you custom action is deferred, there's a mechanism to pass the necessary data into it. You should author a usual immediate "set-a-property" custom action and pass the necessary data to the property called like the name of your deferred CA. The sample is usually much more clear than shaping it into words:
<!-- This is a subsidiary CA, note the property name is equal to the deferred CA name -->
<CustomAction Id="SetForMyDeferredCA" Return="check" Property="MyDeferredCA" Value="source=[SourceFolder];target=[TargetFolder]"/>
<!-- And this is the deferred CA which does the job -->
<CustomAction Id="MyDeferredCA" Return="asyncWait" Execute="deferred" BinaryKey="CustomActions" DllEntry="MyMethodName" />
And inside the deferred CA you can address the passed data like this:
var source = session.CustomActionData["source"];
var target = session.CustomActionData["target"];
Hope this helps.