Feature and Component Self-Repair
Self-repair is one of the most powerful functionalities Windows Installer offers. It gives the ability to check and fix broken packages automatically, saving you valuable development time.
There are two types of self-repair: feature-level and component-level. Each of them is triggered depending on where the issue is located in your package.
How Self-Repair Works
The flow diagram shows how Windows Installer works when triggering the self-repair functionality.
Examples of entry points
- A shortcut that launches an EXE
- An internal component (COM) which is shared between COM applications
- A file extension which associates a specific application type to it etc.
A feature-level repair will result in the entire feature being reinstalled, while component-level repair will only reinstall that component.
In this example, we’ll consider a user that invokes an entry point associated with resource R4.
Windows Installer for an entry point associated with resource R4 will follow the steps below.
- Checks the key paths of all components in Feature 4 (R3 and R5).
- Checks all key paths in each parent feature, Feature 2(R6) and Feature 1( R2)
- If no issues are detected, the application will open.
- If issues are detected, Windows Installer checks all the keys paths in the entire package.
- For Feature 4, a feature-level repair will be applied.
- If issues are found in another component, a component-level repair will be applied only to it.
Thus, by grouping your entry points under dedicated sub-features you could considerably reduce the time it takes for your application to self-repair. This is an optimization that can improve the user experience for your clients and is especially important for enterprise clients which might deploy your application to hundreds or thousands of users inside their company.
Subscribe to Our Newsletter
Sign up for free and be the first to receive the latest news, videos, exclusive How-Tos, and guides from Advanced Installer.