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

Ron Martin cpuwzd at comcast.net
Sun Aug 21 19:23:09 PDT 2022


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


More information about the wix-devs mailing list