[wix-devs] Determining msiexec command line repair options from within a custom action

Bob Arnson bob at firegiant.com
Sun Aug 21 19:46:52 PDT 2022

https://docs.microsoft.com/en-us/windows/win32/msi/command-line-options is better doc: There is a default for -f and it documents the combinations.

Custom actions don't differentiate among repair options: What matters are the states of the component, which is summarized by WcaGetComponentToDo.

> -----Original Message-----
> From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf Of Ron
> Martin via wix-devs
> Sent: Sunday, 21 August, 2022 22:23
> To: wix-devs <wix-devs at lists.wixtoolset.org>
> Cc: Ron Martin <cpuwzd at comcast.net>
> Subject: [wix-devs] Determining msiexec command line repair options from
> within a custom action
> I am trying to determine the active msiexec command-line repair options
> from within a custom action such as CreateUser.
> I have determined that the internal repair command adds "-f " to the
> command line. This seems to assume that there is only one repair option.
> In reality, there are quite a few, and "-f" is not among them. The repair
> options all contain a second letter determining what is to be repaired. These
> options can be merged: For example, if "-fx" and "-fy"
> are both valid and compatible, "-fxy" will activate both actions. The syntax in
> the documentation does not include this merging.
> On the other hand, "-f", itself, is invalid: it silently aborts the parsing of the
> command line. Unfortunately, this means that file names, etc., that may
> follow the repair option on the command line are also ignored. One of our
> failing tests "CanRepair..." fails because of this.
> I cannot find any place in our code that differentiates these cases, nor have I
> figured out how such a differentiation can be made. What does msiexec do
> with the parsed repair options and how can they be accessed from our code?
> I have one place in my new code where I would like to use this information,
> but I don't know how to access it.
> I think that a general discussion of the different repair options is in order
> with regard to how they should affect Wix operations overall.
> Is anyone game?
> Ron
> ________________________________________________________________
> ____
> WiX Toolset Developer Mailing List provided by FireGiant
> http://www.firegiant.com/

More information about the wix-devs mailing list