Creating a custom action on Wix for use in a silent installation

We use Wix to create our MSI installer. We have several user actions that work fine when using the installer, usually with a graphical interface, but when using automatic installation (with msiexec / qb / i), user actions will not be performed.

What can I do to get them working through Wix?

+7
source share
3 answers

I suggest you read (several times if necessary ... it took me a while):

Installation Phases and In-Script Execution Options for Custom Actions in Windows Installer

There are many questions to keep in mind when copyright questions and details are found in this well-written article. It basically sounds like you are only adding a user action in the user interface sequence and not in the execution sequence, but there are other things besides the fact that you have to make sure that you are doing the right thing.

+6
source

They just don't work or don't work? It may be that they are caused by the fact that they do not work in silent mode (see the UILevel property ). If they fail, they may not have some input information (properties) that comes from the user in full interface mode.

In any case, a detailed journal should provide you with additional information.

0
source

You can set "[UILevel]" in ExeCommand and access them through arguments.

<CustomAction Id="customActionId" BinaryKey="InstallerProgram" ExeCommand="[UILevel]" Execute="deferred" Return="check" /> static void Main(string[] args) { var uiLevel = args[0]; //==> [Here is the UILevel][1] } 
0
source