Qiau
Qiau

Reputation: 6175

List files needed to be repaired by MSI "Repair" (msiexec)

I know that there are different ways of repair an installation, using either UI (Control Panel) or CLI (msiexec.exe) but:

How do I ONLY list the actions that would have been executed without really repairing. I.e. show "File xyz is missing." or "File abc is modified since install" without restoring them. (The files are installed as Vital and KeyFile).

Upvotes: 1

Views: 253

Answers (2)

Christopher Painter
Christopher Painter

Reputation: 55601

This doesn't answer your question per say, but based on your interests, I would suggest reading:

Application Resiliency: Unlock the Hidden Features of Windows Installer

The topic "Challenge #1: Self-Invoked Resiliency" is really interesting. It describes a symbiotic relationship between an application and it's installer. The MSI API was meant to be used by applications to enhance the health checks and not simply invoked by merely COM activation and the use of Advertised shortcuts.

It's really unfortunate that very, very, very few applications in the last 14 years have bothered to take it to this level.

Upvotes: 2

Rob Mensching
Rob Mensching

Reputation: 35976

The Windows Installer does not expose information about it's operations at that level of granularity. You could write an External UI handler that started the repair operation (call ::MsiConfigureProduct() after setting up ::MsiSetExternalUI()) then evaulate the Component states after InstallValidate action was called. That should be able to get you the same information that is written to the log file for the Component action states.

Upvotes: 3

Related Questions