none
Setup does not install VSTO runtime before installing VSTO runtime SP1

    Question

  • Hi there,

    I'm deploying an Office 2007 AddIn for Outlook. Therefor I created a MSI project as described at http://msdn.microsoft.com/en-us/library/cc563937.aspx and it almost works fine. The AddIn requires .NET Framework 3.5, Windows Installer 3.1, Office 2007 PIA and VSTO runtime 3.0 with language pack.

    In the properties of the MSI project I marked the prerequisites as recommended in the article mentioned above.

    The folder being created through the build process of the MSI contains the following folders.

    DotNetFX35
    Office2007PIARedist
    VSTOR30
    WindowsInstaller3_1

    The folder VSTOR30 contains the following files.

    vstor30.exe
    vstor30sp1-KB949258-LP-x86-DEU.exe
    vstor30sp1-KB949258-x86.exe
    vstor_lp_de_30.exe

    In the properties dialog of the MSI setup project and there in the required components dialog I can only mark "Visual Studio Tools for the Office System 3.0 Runtime Service Pack 1" as required component. But there is no item for "Visual Studio Tools for the Office System 3.0 Runtime" without the Service Pack.

    Because the fact when installing my AddIn is that the installation of the prerequisites fails while installing the Service Pack 1 for VSTO because VSTO is not installed yet. Manually installing VSTO runteim before the setup is called will succeed installing my AddIn.

    So how do I add "Visual Studio Tools for the Office System 3.0" the required components dialog box?

    And by the way: how do I define the order of the required components to be installed on the target system within the MSI setup project?

    I also checked out the files in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages on my XP developing machine whether some files are missing but that looks good to me. That means I did not miss files.

    What do I have to do for my MSI setup to install VSTO runtime before installing VSTO runtime SP1?

    Thanks in advance

    Mõbius

    Monday, January 12, 2009 12:55 PM

Answers

  • Hey Mõbius,

    I wanted to make sure, by you confirming the presence of our setup registry keys, but this is a bug we discovered recently with our uninstallation of VSTO runtime SP1.

    I believe there is a help article in progress or already available and I will chase it up and post back here if I can find it.

    If you uninstall VSTO runtime SP1 from the Add/Remove Programs (ARP) dialog then the original RTM registry keys are not correctly removed. This then interferes with the bootstrapper which relies purely on these registry keys to identify if VSTO runtime is installed. As you discovered the bootstrapper identifies that the RTM version of the VSTO runtime is installed and proceeds to install SP1. When SP1 attempts to install it fails due to RTM not being on the machine.

    There are a few workarounds at various stages:

    1. Install VSTO runtime manually before running the bootstrapper - the redist install does not rely on this registry key
    2. Delete the entire key HKEY_LOCAL_MACHINE\SOFWARE\Microsoft\vsto runtime Setup before running the bootstrapper
    3. To avoid the registry keys hanging around after uninstall of VSTO runtime SP1 do not uninstall from ARP directly. Instead go to ARP and click the "View Installed Updates" link. Locate VSTO runtime SP1 and uninstall the update. This will uninstall VSTO runtime SP1, remove the SP1 setup keys and leave the RTM version standing. Then go back to the regular program list in ARP and uninstall VSTO runtime. This will then uninstall RTM and its associated setup keys in the registry.

    Cheers,
    Aaron
    Tuesday, January 13, 2009 5:01 PM
  • Hi,

    and thank you for your replies.

    I just tested your workarround #3 and uninstalled the updates before uninstalling VSTO runtime. After this I successfully installed my AddIn.

    Well, I did not know that I have to explicitely uninstall the updates before but I never stop learning.

    Thanks a lot

    Mõbius

    • Marked as answer by Mõbius Wednesday, January 14, 2009 7:43 AM
    Wednesday, January 14, 2009 7:43 AM

All replies

  • Hi Mõbius,

    On the machine where you are attempting the bootstrapper install can you tell me if you have this key and what subkeys and values are under it: 
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\vsto runtime Setup

    This sounds like a problem I am familiar with.

    Cheers,
    Aaron
    Tuesday, January 13, 2009 12:45 AM
  • Hi Aaron,

    thanks for your reply.

    Below you will find an export of the desired registry key. Don't wonder because of the Wow6432Node. Just to explain, it is the key for 32bit applications on 64bit operating Vista.

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\vsto runtime Setup]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\vsto runtime Setup\v9.0.21022]
    "Install"=dword:00000001
    "SP"=dword:00000000
    "MSI"=dword:00000001

    Remembering the custom actions of the MSI setup project from the article mentioned in my first post I now understand why this setup is not called.

    But I have a new information concerning my first post. A few more tests on virgin Vista machines did not result in errors as described above. But after uninstallation of VSTO runtime the keys shown above seem to remain in registry. I additionally modified the setup project not to search for the registry keys shown above but to search for VSTO runtime component id (AF68A0DE-C0CD-43E1-96DD-CBD9726079FD). So this is the same procedure as searching for Office PIA and so on. But this setup also fails. That seems to me that many registry keys will remain on the target system when uninstalling the VSTO runtime.

    Well, these are are the information I can provide.

    Any ideas?

    Mõbius

    Tuesday, January 13, 2009 7:55 AM
  • Hey Mõbius,

    I wanted to make sure, by you confirming the presence of our setup registry keys, but this is a bug we discovered recently with our uninstallation of VSTO runtime SP1.

    I believe there is a help article in progress or already available and I will chase it up and post back here if I can find it.

    If you uninstall VSTO runtime SP1 from the Add/Remove Programs (ARP) dialog then the original RTM registry keys are not correctly removed. This then interferes with the bootstrapper which relies purely on these registry keys to identify if VSTO runtime is installed. As you discovered the bootstrapper identifies that the RTM version of the VSTO runtime is installed and proceeds to install SP1. When SP1 attempts to install it fails due to RTM not being on the machine.

    There are a few workarounds at various stages:

    1. Install VSTO runtime manually before running the bootstrapper - the redist install does not rely on this registry key
    2. Delete the entire key HKEY_LOCAL_MACHINE\SOFWARE\Microsoft\vsto runtime Setup before running the bootstrapper
    3. To avoid the registry keys hanging around after uninstall of VSTO runtime SP1 do not uninstall from ARP directly. Instead go to ARP and click the "View Installed Updates" link. Locate VSTO runtime SP1 and uninstall the update. This will uninstall VSTO runtime SP1, remove the SP1 setup keys and leave the RTM version standing. Then go back to the regular program list in ARP and uninstall VSTO runtime. This will then uninstall RTM and its associated setup keys in the registry.

    Cheers,
    Aaron
    Tuesday, January 13, 2009 5:01 PM
  • hi Aaron,

    that Help article is here: Troubleshooting Office Solution Deployment (2007 System).

    Visual Studio Tools for Office 3.0 Service Pack 1 Runtime Does Not Re-Install

    When you use the Setup.exe to re-install the Visual Studio Tools for Office 3.0 Service Pack 1 (SP1) runtime on a computer that previously had the Visual Studio Tools for Office 3.0 SP1 runtime installed, the installation may fail. To fix this error, delete the [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\vsto runtime Setup\] registry key and run the VSTO 3.0 SP1 installer again.

    Tuesday, January 13, 2009 6:09 PM
    Moderator
  • Thanks Mary, was about to send you an email about it :D
    Tuesday, January 13, 2009 6:16 PM
  • Hi,

    and thank you for your replies.

    I just tested your workarround #3 and uninstalled the updates before uninstalling VSTO runtime. After this I successfully installed my AddIn.

    Well, I did not know that I have to explicitely uninstall the updates before but I never stop learning.

    Thanks a lot

    Mõbius

    • Marked as answer by Mõbius Wednesday, January 14, 2009 7:43 AM
    Wednesday, January 14, 2009 7:43 AM
  • I have just posted an article on the VSTO blog outlining a more elegant remedy for this problem. You can find it here.
    Saturday, February 07, 2009 9:17 AM
  • Dear M. Cathart;

    I followed this thread and your blog entry.
    I posted about problems with VS 2010 Beta and Office 2010 Beta; i can't make trivial addin function.
    I modfied the product.xml file as you sugested and now the trivial addin is completely misseed.

    Here is a pointer to my Office Developer Forum;

    http://social.msdn.microsoft.com/Forums/en-US/innovateonoffice/thread/57c95f1a-b34d-4fcb-a77e-f8420909d160/

    Here is the trivial Addin that won't break or run.
    I keep re-enableing it in the Outlook Addin Options.
    I have tried addin spy, and it reports it can't find the addin dlls, even through the paths are correct.

    I had gotten some traceback info before I made the mods you suggested.
    How can i get this running ?
    I have repaired both my Office2010 and VS2010 installations.
    I removed VS2008.

    I have been struggleing with this too long as someone new to VS and Office development.

    AddIn spy should report it can find the DLL's if it is working, right ?
    That is the tool that aerted me to a potental problem with VSTO 3.0/3.5
    I thought that tool was not needed for VS2010 ?

    dB


    using System;
    using System.Diagnostics;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Xml.Linq;
    using Outlook = Microsoft.Office.Interop.Outlook;
    using Office = Microsoft.Office.Core;
    
    namespace OutlookAddIn7
    {
        public partial class ThisAddIn
        {
            private void ThisAddIn_Startup( object sender , System.EventArgs e )
                {
                Outlook.Application oApp = this.Application;
    
                Console.WriteLine ( string.Format ( "Hello ! application={0}" , oApp ) );
                }
            private void ThisAddIn_Shutdown( object sender , System.EventArgs e )
                {
                Console.WriteLine ( string.Format ( "TA Ta for NOW" ) );
                }
    
            #region VSTO generated code
    
            /// <summary>
            /// Required method for Designer support - do not modify
            /// the contents of this method with the code editor.
            /// </summary>
            private void InternalStartup()
            {
                this.Startup += new System.EventHandler(ThisAddIn_Startup);
                this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
            }
            
            #endregion
        }
    }
    

    doctor K
    Monday, February 15, 2010 6:12 PM
  • Hi doctor K,

    It doesnt seem like the post you linked to and this thread are related. This thread covers a problem with the bootstrapper installation of the VSTO 3.0 runtime.

    Also, the ComException you are getting is after a direct PIA call which does not involve VSTO.

    Cheers,
    Aaron

    Tuesday, February 16, 2010 8:07 AM
    Moderator
  • Hi,

    I have the same problem but I still have it even after apply your procedure.

    I have developped an Add-in for Excel 2007 with a setup project. I'd like to test the installer on my compturer so I did the mistake of uninstalling the VSTO 3 runtime from the ARP ...

    So, when I try to install my addin it tries to install directly the VSTO runtime SP1. It crashes saying that the Sp1 is already installed (????!!??)

    I followed your steps but it still crashes ...

    I don't know what to do to have a completely clean machine (without any trace in the registry).

    Wednesday, March 31, 2010 3:13 PM
  • Cabrinha, it sounds like you have deleted the registry keys but VSTO SP1 is still installed.

    Can you try doing this please:

    1. In the Add/Remove Programs window click View Installed Updates and look for VSTO 3.0 SP1

    2. Uninstall VSTO 3.0 SP1 from this window

    3. Try running your setup project again

    Wednesday, March 31, 2010 7:19 PM
    Moderator
  • Also, I mentioned above a blog post that solves this problem for all customizations created on a development machine by altering the bootstrapper package to use different detection logic. Check it out here: http://blogs.msdn.com/vsto/archive/2009/02/07/vsto-runtime-bootstrapper-package-failure-causes-deployed-customization-installation-to-fail-aaron-cathcart.aspx
    Wednesday, March 31, 2010 7:22 PM
    Moderator
  • Hi,

    I followed all your steps but I still have the problem.

    As you can see here : http://img214.imageshack.us/img214/7010/setup1.png I only have VSTOR3 installed but when I am trying to run my setup I have this popup : 

    http://img388.imageshack.us/img388/7853/setup2.png

    Ok, it's fine. It's detecting my VSTOR3 so it wants to install the SP1. But it still crashes with the same message. 

     

    ==================== INSTALL.LOG ===================

    The following properties have been set:

    Property: [AdminUser] = true {boolean}

    Property: [ProcessorArchitecture] = Intel {string}

    Property: [VersionNT] = 5.1.3 {version}

    Running checks for package 'Windows Installer 3.1', phase BuildList

    The following properties have been set for package 'Windows Installer 3.1':

    Running checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe'

    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '3.1': true

    Result of checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' is 'Bypass'

    'Windows Installer 3.1' RunCheck result: No Install Needed

    Running checks for package '.NET Framework 3.5', phase BuildList

    Reading value 'Install' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\1036'

    Read integer value 1

    Setting value '1 {int}' for property 'DotNet35InstallSuccess'

    The following properties have been set for package '.NET Framework 3.5':

    Property: [DotNet35InstallSuccess] = 1 {int}

    Running checks for command 'DotNetFX35\dotNetFx35setup.exe'

    Result of running operator 'ValueEqualTo' on property 'DotNet35InstallSuccess' and value '1': true

    Result of checks for command 'DotNetFX35\dotNetFx35setup.exe' is 'Bypass'

    '.NET Framework 3.5' RunCheck result: No Install Needed

    Running checks for package 'Microsoft Office 2007 Primary Interop Assemblies', phase BuildList

    Running external check with command 'C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\Office2007PIARedist\ComponentCheck.exe' and parameters ''

    Process exited with code 1

    Setting value '1 {int}' for property 'PIAInstallAction'

    The following properties have been set for package 'Microsoft Office 2007 Primary Interop Assemblies':

    Property: [PIAInstallAction] = 1 {int}

    Running checks for command 'Office2007PIARedist\o2007pia.msi'

    Result of running operator 'ValueNotEqualTo' on property 'PIAInstallAction' and value '0': true

    Result of checks for command 'Office2007PIARedist\o2007pia.msi' is 'Bypass'

    'Microsoft Office 2007 Primary Interop Assemblies' RunCheck result: No Install Needed

    Running checks for package 'Visual Studio Tools pour Office System 3.0 Runtime Service Pack 1', phase BuildList

    Reading default value of registry key '{8FB53850-246A-3507-8ADE-0060093FFEA6}'

    Unable to read registry value

    Not setting value for property 'VSTORuntimeInstalled'

    Reading value 'Update' of registry key 'HKLM\SOFTWARE\Microsoft\VSTO Runtime Setup\v3'

    Unable to read registry value

    Not setting value for property 'VSTORuntimeUpdateInstalled'

    Reading value 'Install' of registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTO Runtime Langpack\v2.0.50727\1036'

    Unable to read registry value

    Not setting value for property 'VSTORLangPackInstalled'

    Reading value 'Update' of registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTO Runtime Langpack\v3\1036'

    Unable to read registry value

    Not setting value for property 'VSTORLangPackUpdateInstalled'

    The following properties have been set for package 'Visual Studio Tools pour Office System 3.0 Runtime Service Pack 1':

    Running checks for command 'VSTOR30\vstor30.exe'

    Skipping ByPassIf because Property 'VSTORuntimeInstalled' was not defined

    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false

    Result of checks for command 'VSTOR30\vstor30.exe' is 'Install'

    Running checks for command 'VSTOR30\vstor30sp1-KB949258-x86.exe'

    Skipping ByPassIf because Property 'VSTORuntimeUpdateInstalled' was not defined

    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false

    Result of checks for command 'VSTOR30\vstor30sp1-KB949258-x86.exe' is 'Install'

    Running checks for command 'VSTOR30\vstor_lp_fr_30.exe'

    Skipping ByPassIf because Property 'VSTORLangPackInstalled' was not defined

    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false

    Result of checks for command 'VSTOR30\vstor_lp_fr_30.exe' is 'Install'

    Running checks for command 'VSTOR30\vstor30sp1-KB949258-LP-x86-FRA.exe'

    Skipping ByPassIf because Property 'VSTORLangPackUpdateInstalled' was not defined

    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false

    Result of checks for command 'VSTOR30\vstor30sp1-KB949258-LP-x86-FRA.exe' is 'Install'

    'Visual Studio Tools pour Office System 3.0 Runtime Service Pack 1' RunCheck result: Install Needed

    EULA for components 'Visual Studio Tools pour Office System 3.0 Runtime Service Pack 1' was accepted.

    Copying files to temporary directory "C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\"

    Downloading files to "C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\"

    (01/04/2010 08:19:39) Downloading 'VSTOR30\vstor30.exe' from 'http://go.microsoft.com/fwlink/?LinkId=95146' to 'C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\'

    Download completed at 01/04/2010 08:19:39

    Verifying file integrity of C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\VSTOR30\vstor30.exe

    WinVerifyTrust returned 0

    File trusted

    (01/04/2010 08:19:40) Downloading 'VSTOR30\vstor30sp1-KB949258-LP-x86-FRA.exe' from 'http://go.microsoft.com/fwlink/?LinkId=120188&clcid=0x40C' to 'C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\'

    Download completed at 01/04/2010 08:19:40

    Verifying file integrity of C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\VSTOR30\vstor30sp1-KB949258-LP-x86-FRA.exe

    WinVerifyTrust returned 0

    File trusted

    (01/04/2010 08:19:40) Downloading 'VSTOR30\vstor30sp1-KB949258-x86.exe' from 'http://go.microsoft.com/fwlink/?LinkId=120187' to 'C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\'

    Download completed at 01/04/2010 08:19:43

    Verifying file integrity of C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\VSTOR30\vstor30sp1-KB949258-x86.exe

    WinVerifyTrust returned 0

    File trusted

    (01/04/2010 08:19:43) Downloading 'VSTOR30\vstor_lp_fr_30.exe' from 'http://go.microsoft.com/fwlink/?LinkId=95147&clcid=0x40C' to 'C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\'

    Download completed at 01/04/2010 08:19:43

    Verifying file integrity of C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\VSTOR30\vstor_lp_fr_30.exe

    WinVerifyTrust returned 0

    File trusted

    Running checks for package 'Visual Studio Tools pour Office System 3.0 Runtime Service Pack 1', phase BeforePackage

    Reading default value of registry key '{8FB53850-246A-3507-8ADE-0060093FFEA6}'

    Unable to read registry value

    Not setting value for property 'VSTORuntimeInstalled'

    Reading value 'Update' of registry key 'HKLM\SOFTWARE\Microsoft\VSTO Runtime Setup\v3'

    Unable to read registry value

    Not setting value for property 'VSTORuntimeUpdateInstalled'

    Reading value 'Install' of registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTO Runtime Langpack\v2.0.50727\1036'

    Unable to read registry value

    Not setting value for property 'VSTORLangPackInstalled'

    Reading value 'Update' of registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTO Runtime Langpack\v3\1036'

    Unable to read registry value

    Not setting value for property 'VSTORLangPackUpdateInstalled'

    The following properties have been set for package 'Visual Studio Tools pour Office System 3.0 Runtime Service Pack 1':

    Running checks for command 'VSTOR30\vstor30.exe'

    Skipping ByPassIf because Property 'VSTORuntimeInstalled' was not defined

    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false

    Result of checks for command 'VSTOR30\vstor30.exe' is 'Install'

    Running checks for command 'VSTOR30\vstor30sp1-KB949258-x86.exe'

    Skipping ByPassIf because Property 'VSTORuntimeUpdateInstalled' was not defined

    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false

    Result of checks for command 'VSTOR30\vstor30sp1-KB949258-x86.exe' is 'Install'

    Running checks for command 'VSTOR30\vstor_lp_fr_30.exe'

    Skipping ByPassIf because Property 'VSTORLangPackInstalled' was not defined

    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false

    Result of checks for command 'VSTOR30\vstor_lp_fr_30.exe' is 'Install'

    Running checks for command 'VSTOR30\vstor30sp1-KB949258-LP-x86-FRA.exe'

    Skipping ByPassIf because Property 'VSTORLangPackUpdateInstalled' was not defined

    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false

    Result of checks for command 'VSTOR30\vstor30sp1-KB949258-LP-x86-FRA.exe' is 'Install'

    'Visual Studio Tools pour Office System 3.0 Runtime Service Pack 1' RunCheck result: Install Needed

    Verifying file integrity of C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\VSTOR30\vstor30.exe

    WinVerifyTrust returned 0

    File trusted

    Installing using command 'C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\VSTOR30\vstor30.exe' and parameters ' /q:a /c:"install /q /l"'

    Process exited with code 0

    Verifying file integrity of C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\VSTOR30\vstor30sp1-KB949258-x86.exe

    WinVerifyTrust returned 0

    File trusted

    Installing using command 'C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\VSTOR30\vstor30sp1-KB949258-x86.exe' and parameters ' /q:a /c:"install /q /l"'

    Process exited with code 0

    Verifying file integrity of C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\VSTOR30\vstor_lp_fr_30.exe

    WinVerifyTrust returned 0

    File trusted

    Installing using command 'C:\DOCUME~1\fmeriot\LOCALS~1\Temp\VSDEB.tmp\VSTOR30\vstor_lp_fr_30.exe' and parameters ' /q:a /c:"install /q /l"'

    Process exited with code 1638

    Status of package 'Visual Studio Tools pour Office System 3.0 Runtime Service Pack 1' after install is 'InstallFailed'

    =================================================


    Thursday, April 01, 2010 6:23 AM
  • Can you try repairing or uninstalling VSTOR 3.0 and try the bootstrapper again?

    Thursday, April 08, 2010 5:04 AM
    Moderator