Is there a way to execute a command (in PoSh, ideally) and assign the output to the value of a property in WiX? So far, all I have seen is custom actions that will run a command, but not capture output or set a property's value.
Asked
Active
Viewed 768 times
1 Answers
1
Custom actions can access the Wix Session and set a property on the session that can be read out later.
This is C# code but it would be similar in PS
[CustomAction]
public static ActionResult myaction(Session session)
{
session["myvariable"] = "myvalue";
}
After the action has been executed you can access it in the UI as if it where a normal property. Be aware though that if you are planning on changing the UI to respond to this you will need to use a hack to make the wix UI realise that the value has changed...see my answer in this SO question Wix Interactions with Conditions, Properties & Custom Actions

Community
- 1
- 1

Daniel Powell
- 8,143
- 11
- 61
- 108