View Full Version : Auto Repair can't be canceled

10-25-2005, 09:59 AM
If I instigate an auto/self repair and physically prevent access to the installation source, it cannot be canceled (by clicking the dialog Cancel button), ever...and is stuck in a loop. From what I can tell this seems to be normal Windows Installer behavior.

How can I force the cancelation of an auto repair? I do not wish for our end-users to get stuck within this problem...just because they cannot locate their installation source (a CD). I realize that the application should not run if it cannot successfully auto repair, which is by far more acceptable than an endless loop.

10-25-2005, 04:02 PM
How do you enforce the self-repair?
If your program calls MsiReinstallFeature(), and the user cancels, MsiReinstallFeature() will return ERROR_USER_INSTALLEXIT (or something like that). If you save that situation in a global flag, then you can check that flag first the next time.

10-26-2005, 08:27 PM
I don't do anything to enforce self repair...I'd love to disable it, but that's not really possible for key'd components.

What would you suggest I do?

10-27-2005, 06:27 AM
Something enforces a repair of your package. The eventlog reveals the component being repaired, that could be helpful.

10-27-2005, 03:02 PM
Yes that is true. As I stated, if I instigate/force a self repair by removing one file, that file's component will be trigger a self repair.