1

I want to call Custom action, which is a deferred C# method, with key/value pair that contains XPath and therefore brackets.

I define action as
<CustomAction Id= 'action1.smth' Property='action1' Value="TARGETXPATH=/configuration/application[\[]@name='xService'[\]]/@address/>

Logging verbose installation I can see custom action is called as Executing op: CustomActionSchedule ... TARGETXPATH=/configuration/application[@name='xService']/@address

Great, but when same value is session.log-ed I get

'/configuration/application/@address'

niproblema
  • 91
  • 1
  • 10

1 Answers1

1

Figured it out when I debugged the custom action. Turns out session.Log() escapes the brackets again so the wrong value is put in the verbose log, but other than that correct values were propagated to the custom action.

niproblema
  • 91
  • 1
  • 10
  • [Debugging MSI Custom actions](https://stackoverflow.com/questions/52878332/wixsharp-debug-custom-action-in-console/52880033#52880033). – Stein Åsmul Jan 20 '20 at 19:10