Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS
with no warranties, and confer no rights. Additionally, views expressed
herein are my own and not those of my employer, Microsoft.
Recently, I helped investigate this Visual Studio 2005 issue reported on the Microsoft Connect site that I wanted to describe here in case anyone reading this blog runs into a similar issue. To summarize that bug report, a couple of customers had installed VS 2005, and they started to notice that a repair would be triggered for VS when they launched Microsoft Outlook.
How to reproduce this issue
In the cases that I investigated, the customers had large-capacity USB hard drives connected to their systems. The repair would occur if they disconnected or powered off their USB hard drive, and it would not occur if the USB hard drive was connected.
How to workaround this issue
There are a few possible workarounds for this type of repair:
1. Uninstall VS, then re-install it with the external hard drive disconnected
2. Leave the external hard drive connected when starting Outlook
3. Use the following steps to remove a couple of registry values from the system:
Option 3 (deleting the registry values) is the least invasive, and there will not be any functional side effects in VS 2005 or in Outlook if you choose to do this. The values that are listed above are only used by Windows Installer to advertise features, but VS 2005 installs all features locally and does not support advertising, so those registry values do not serve any practical purpose anyway.
More information about the root cause
To track down the exact cause of this repair, I had the customers send me some information from their application event logs in order to narrow this down. As I described in this blog post, when Windows Installer triggers a repair of an MSI, it will log a pair of warnings in the application event log with a source named MsiInstaller. The first warning will provide the component GUID for the component in the MSI that triggered the health check, and the second warning will provide the component GUID for the component in the MSI that Windows Installer detected was broken and in need of repair.
There is a component in the VS 2005 product that has been incorrectly authored to try to use the drive with the largest amount of free space (the TARGETDIR property in Windows Installer) as a destination location. In these cases, this drive resolved to the USB hard drive, and when that drive was disconnected or powered off, a repair will be triggered in cases where a health check is initiated by the system.
As I described in this blog post, COM objects that are advertised in the Class table of an MSI will cause Windows Installer to perform a health check for the feature(s) that advertise them each time an instance of the COM object is instantiated. The VS 2005 MSI advertises a couple of COM objects that are related to VBA add-in development, and Microsoft Outlook will try to instantiate those COM objects when it is launched in some cases. In these cases, a health check of the VS 2005 product will occur, and the incorrectly authored component will be reported as broken if the USB hard drive is not available.
Fortunately, there are a couple of changes in VS 2008 setup that will prevent this scenario from happening in the future:
PingBack from http://msdnrss.thecoderblogs.com/2007/08/17/how-to-workaround-issue-where-launching-outlook-triggers-a-repair-of-vs-2005/
Microsoft Visual Studio 2010 Beta 1 customers have been reporting that when they start Outlook or any