{"id":723,"date":"2009-05-29T17:52:00","date_gmt":"2009-05-29T17:52:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/2009\/05\/29\/how-to-work-around-the-issue-when-opening-office-applications-repairs-visual-studio\/"},"modified":"2019-02-17T15:29:50","modified_gmt":"2019-02-17T22:29:50","slug":"how-to-work-around-the-issue-when-opening-office-applications-repairs-visual-studio","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/how-to-work-around-the-issue-when-opening-office-applications-repairs-visual-studio\/","title":{"rendered":"How to work around the issue when opening Office applications repairs Visual Studio"},"content":{"rendered":"<p><a href=\"http:\/\/www.microsoft.com\/visualstudio\/products\/2010\/default.mspx\">Microsoft Visual Studio 2010 Beta 1<\/a> customers have been reporting that when they start Outlook or any of the Office applications, VS2010 is repaired. This issue can also happen for <a href=\"http:\/\/blogs.msdn.com\/astebner\/archive\/2007\/08\/17\/4430917.aspx\">VS2005<\/a> and VS2008, and for any products using Visual Basic for Applications (VBA).<\/p>\n<p>Besides being an annoyance and potentially taking a while to complete, the repair attempt can prompt for source. Picking the right source may not always be obvious from the dialog caption especially if it is truncated. And all the while Outlook or whichever application you started is probably waiting to finish starting up.<\/p>\n<p>Even if you successfully complete the repair operation, this issue may continue each time you start the same application.<\/p>\n<h3>How to work around this issue<\/h3>\n<p>Windows Installer logs an event that describes the requested feature and which product it is repairing. For this simple workaround, you need to find the latest event log entry. Using information in that event log entry, you\u2019ll remove and re-add a feature and all its components into directory that should always be available.<\/p>\n<ol>\n<li>Click on <b>Start<\/b> <\/li>\n<li>Click on <b>Run<\/b> <\/li>\n<li>Type \u201ceventvwr\u201d (without quotes) and click <b>OK<\/b>. If you are prompted to elevated on Vista or newer, click <b>Continue<\/b>. <\/li>\n<li>Expand <b>Windows Logs<\/b> and click <b>Application<\/b> <\/li>\n<li>Find the recent warning where the Source is MsiInstaller. In Vista and newer,\n<ol style=\"list-style-type: lower-alpha\">\n<li>Click <b>Filter Current Log\u2026<\/b> in the right action pane <\/li>\n<li>Check <b>Warning<\/b> <\/li>\n<li>Type \u201cMsiInstaller\u201d (without quotes) in the <b>Event sources<\/b> edit control <\/li>\n<li>Type \u201c1001\u201d (without quotes) in the event IDs edit control <\/li>\n<li>Click <b>OK<\/b> <\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>You should see a message similar to the follow,<\/p>\n<blockquote>\n<p>Detection of product &#8216;{316EE0C1-DB94-30BA-95E6-F4959035EE4B}&#8217;, feature &#8216;VB_for_VS_7_Ent_28_x86_enu&#8217; failed during request for component &#8216;{DD68FEE8-C369-11D1-A173-00A0C90AB50F}&#8217;<\/p>\n<\/blockquote>\n<p>I&#8217;ve also attached an event viewer filter you can unzip and import as a custom view.<\/p>\n<p>Keep the log viewer open with the recent warning of type 1001 and open an elevated command prompt.<\/p>\n<ul>\n<li>On XP as an administrator,\n<ol>\n<li>Click on <b>Start<\/b> <\/li>\n<li>Click on <b>Run<\/b> <\/li>\n<li>Type \u201ccmd\u201d (without quotes) and click <b>OK<\/b> <\/li>\n<\/ol>\n<\/li>\n<li>On Vista and newer.\n<ol>\n<li>Click on <b>Start<\/b> <\/li>\n<li>Type \u201cCommand Prompt\u201d (without quotes) <\/li>\n<li>Right click on <b>Command Prompt<\/b> and click <b>Run as administrator<\/b>. If you are prompted to elevated, click <b>Continue<\/b>. <\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>You\u2019ll now use the information in the warning message to run two commands consecutively. The first command removes the feature, and the second command reinstalls it locally. The reason you need to do this for this simple workaround is explained in detail below. Use the GUID after \u201cproduct\u201d along with the feature name as shown in the corresponding example below.<\/p>\n<p><code>start \/wait msiexec.exe \/i {316EE0C1-DB94-30BA-95E6-F4959035EE4B} \/L*vx \"%TEMP%\\1.remove.log\" REMOVE=VB_for_VS_7_Ent_28_x86_enu <br \/>start \/wait msiexec.exe \/i {316EE0C1-DB94-30BA-95E6-F4959035EE4B} \/L*vx \"%TEMP%\\2.addlocal.log\" ADDLOCAL=VB_for_VS_7_Ent_28_x86_enu TARGETDIR=\"%ProgramFiles%\\Microsoft Visual Studio 10.0\"<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>You will likely be prompted for your installation media when running the second command, so be sure to have your installation DVD loaded or ISO mounted. If you installed from the web or your media is not available, you will be prompted to download the media from the web.<\/p>\n<h3>How to avoid this issue<\/h3>\n<p>If you have any external drives connected to your machine, consider disconnecting them when installing Visual Studio or make sure that they are plugged in when starting applications like Outlook if you have any add-ins for those applications installed.<\/p>\n<h3>Description of the issue<\/h3>\n<p>Some components in Visual Studio are authored to support advertised installations. By default, advertised components will not be installed until they are needed. For COM servers, Windows Installer writes encoded data to the server library registry value like InProcServer32. This information contains information about the product and feature that will install the component. Windows Installer will always trigger a health check when advertised data is present for COM objects since, inherently, the COM server path isn\u2019t registered.<\/p>\n<p>Even though the feature that installs these components is typically installed locally, Windows Installer still writes this encoded data to the registry. This isn\u2019t normally a problem unless the components to be advertised also install to <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa372064.aspx\">TARGETDIR<\/a> or a descendant of TARGETDIR that is not otherwise redirected.<\/p>\n<p>Because TARGETDIR must be the root directory of any Windows Installer package, technically every directory is a descendant of TARGETDIR; however, directories like <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa370881.aspx\">ProgramFilesFolder<\/a> are automatically redirected to their corresponding directories like C:\\Program Files. Custom actions can also redirect directories, and this is typical in Visual Studio. If TARGETDIR itself isn\u2019t redirected, it defaults to <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa371372.aspx\">ROOTDRIVE<\/a> which is the fixed drive with the most free space available, and \u201cfixed drive\u201d doesn\u2019t necessarily mean its an internal drive. External drives these days are growing more common. Any descendants of TARGETDIR are also located relative to ROOTDRIVE then.<\/p>\n<p>So if you have an external drive with a lot of free space connected when you installed Visual Studio, a number of components may have gotten installed there. Even if you do not see any files mysteriously appear after installing Visual Studio, components may still have gotten registered to the other drive. This can actually happen for any Windows Installer products.<\/p>\n<p>Now if you start a product like Outlook that might have add-ins installed that use Visual Studio Tools for Office system Runtime (VSTOR) or Visual Basic for Applications (VBA), creating COM objects they install triggers a repair. This happens because Windows Installer requires the COM server path and this, in turn, triggers a health check. Since the component installation directory \u2013 TARGETDIR or a descendant when the component was installed \u2013 is no longer available, a repair begins but will ultimately fail in this case since the installation directory is unavailable.<\/p>\n<p>Other problems may manifest. For example, if a file within the same feature is missing for unrelated reasons, Windows Installer installer may prompt for source to replace that file.<\/p>\n<p>So if you had an external drive connected when you installed Visual Studio, make sure you keep it connected when starting applications like Outlook if you have add-ins installed \u2013 or at least if you\u2019re experiencing this issue. Better yet for VS 2010 Beta 1, disconnect it when installing Beta 1 unless you intend to install Beta 1 to that drive but remember to keep it connected. On a related note, keep in mind that disk space on your Windows system drive is still <a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2008\/07\/24\/why-windows-installer-may-require-so-much-disk-space.aspx\">consumed by Windows Installer<\/a>, .NET Framework, and a few other components.<\/p>\n<p>We are working to identify all possible components that may cause this issue for future releases, including VS2010.<\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Components.PostAttachments\/00\/09\/66\/19\/38\/Filter.zip\">Filter.zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft Visual Studio 2010 Beta 1 customers have been reporting that when they start Outlook or any of the Office applications, VS2010 is repaired. This issue can also happen for VS2005 and VS2008, and for any products using Visual Basic for Applications (VBA). Besides being an annoyance and potentially taking a while to complete, the [&hellip;]<\/p>\n","protected":false},"author":389,"featured_media":3843,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[20,45,52],"class_list":["post-723","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-installation","tag-visual-studio","tag-vs2010"],"acf":[],"blog_post_summary":"<p>Microsoft Visual Studio 2010 Beta 1 customers have been reporting that when they start Outlook or any of the Office applications, VS2010 is repaired. This issue can also happen for VS2005 and VS2008, and for any products using Visual Basic for Applications (VBA). Besides being an annoyance and potentially taking a while to complete, the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/723","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/users\/389"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/comments?post=723"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/723\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media\/3843"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media?parent=723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}