Udi Wertheimer
Udi Wertheimer

Reputation: 293

Creating a custom action in Wix for use in silent installation

We use Wix to create our MSI installer. We have a few custom actions that work great when using the installer normally with a GUI, but when using silent install (with "msiexec /qb /i" ), the custom actions won't run.

What can I do to make them work through Wix?

Upvotes: 9

Views: 4874

Answers (3)

DaNeSh
DaNeSh

Reputation: 1062

You can set "[UILevel]" in ExeCommand and access it trough 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]
    }

Upvotes: 0

Christopher Painter
Christopher Painter

Reputation: 55610

I suggest you read (several times if needed... it took me awhile at first):

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

There are a great many things to consider when authoring questions and the details are in that well written article. Basically it sounds like you only put the custom action in the UI sequence and not the Execute Sequence but there are other things beyond that you should make sure you are doing correctly.

Upvotes: 8

Yan Sklyarenko
Yan Sklyarenko

Reputation: 32270

Do they simply not run or fail? It might be the case they are conditioned not to run in quiet mode (see UILevel property). If they fail, they might lack some input information (properties) which comes from user in full UI mode.

Anyway, the verbose log should give you more information.

Upvotes: 0

Related Questions