Troubleshooting unwanted self-repairs using the Event Viewer
|Article:HOWTO5638|||||Created: 2005-09-07|||||Updated: 2006-03-02|||||Article URL http://www.symantec.com/docs/HOWTO5638|
When I open an application, it tries to run a self-repair. What is causing this and how can I prevent it?
Wise for Windows Installer 4.21, 5.21, 6.x
Wise for Visual Studio .NET 5.21
Wise Package Studio 4.62 5.62, 6.x
When an application's entry point detects that a component key path is missing, the installation initiates a self-repair. There are some specific, common events that can cause an application to begin a self-repair every time a user opens the application.
HKEY_Current_User Registry KeysYour installation might begin a self-repair if it contains HKEY_Current_User (HKCU) keys and has a component key path of an HKCU registry key. Self-repair occurs the first time a new user (other than the user who installed the package) logs on and launches the application. This causes a self-repair because when Windows Installer initially installs the package, it only writes the HKCU keys for the current user. Windows Installer depends on the self-repair functionality to distribute the HKCU keys to other users on the machine who are using the application.
Missing Files/Registry KeysWindows Installer checks for the existence of the file or registry key set as the key path of the component. If this is file or registry key is used to hold data that is deleted by the application itself, this will cause the installation to repair frequently.
In Wise for Windows Installer and Wise Package Studio, you might use SetupCapture to capture an application. It's possible that temporary files are captured. Temporary files might be captured when a reboot is required or if the vendor installation leaves any temporary files on the target machine. If temporary files remain in the .MSI file as key paths, repairs trigger when the temporary files are removed from the target machine. To exclude temporary files captured during a reboot from SetupCapture, add the files to your exclusion list.
Self-repair is one of the most powerful features of Microsoft's Windows Installer. It gives the installation the ability to monitor and heal a broken package automatically which saves you hours of troubleshooting time. Yet when an application repairs every time a user opens it, self-repair begins to create more work. To prevent constant repair and make self-repair be a timesaving process for you, use the Event Viewer to determine when self-repair occurred,and the source of the error. Then use Wise for Windows Installer or Windows Installer Editor in Wise Package Studio to find out more information about and modify the source that caused the self-repair to occur.
Event Viewer is a utility available on Windows XP, Windows 2000, and Windows NT that records functions of Windows Installer. This includes those instances when your installation repaired itself.
To view the component that's causing the .MSI to repair:
- From the Windows Start menu, select Settings > Control Panel.
- In Control Panel, double-click on Administrative Tools, then double-click on Event Viewer.
- In the Event Viewer tree, select Application Log. Warning types of events in the Application Logs indicate when Windows Installer repaired itself. You can check the time of these events to confirm the warnings were for your application. The source of the warnings is MsiInstaller.
- To view details of a Warning event type in the Application Log, double-click the Warning event or select it and then press ENTER. The Event Properties dialog box appears. This dialog box lists the source of the error. In some instances, the Description displays the exact resource, such as the file, registry key, or ODBC data source that triggered the repair. If the file or registry key that caused the warning is not in the description, you can open the .WSI or .MSI file to find the cause.
- Once you have the Component ID of the component that caused the warning, click Cancel to close Event Properties, and then close Event Viewer.
After you have determined the component causing the self-repair, use Wise for Windows Installer or Windows Installer Editor in Wise Package Studio to look at the details of the component.
To find the problem component using Wise for Windows Installer, the Windows Installer Editor in Wise Package Studio, or Wise for Visual Studio .NET:
- Open the .MSI in your Wise product.
- Click the Setup Editor tab, then click the Tables tab.
- In the Component table, identify the component name that has the ComponentID indicated in the Event Viewer; this will give you the name of the problem component.
- Click the Components tab.
- Select a component then right-click and select Details. The Component Details dialog box appears. It displays the key path type (file, registry key, or ODBC data source) and the resource that was missing or corrupt to cause the self-repair.
- You can change the details of a component, if desired, to prevent a self-repair.
Recognizing common causes of self-repair can help you troubleshoot an application. Troubleshooting is quick and simple using the Event Viewer, which lets you diagnose which ComponentID is causing constant self-repairs. Then, with Wise tools, you can more specifically identify which component is causing the problem. With this information, you can eliminate unwanted self-repair on an application and take advantage of Windows Installer's built-in self-repair process.
Article URL http://www.symantec.com/docs/HOWTO5638