VSTO Runtime bootstrapper package failure causes deployed customization installation to fail (Aaron Cathcart)

  • Comments 8

In an attempt to make this easier to read here are a few terms I will be using frequently in this article:

  • VSTOR = Visual Studio Tools for the Microsoft Office System (version 3.0 Runtime) (x86)
  • VSTORSP1 = Visual Studio Tools for the Microsoft Office System (version 3.0 Runtime) Service Pack 1(x86)
  • Bootstrapper = the clickonce bootstrapper that gets deployed with a VSTO customization when there are prerequisites checked (setup.exe)

Some of our customers have raised an issue with the bootstrapper failing after deploying their customizations onto a user’s machine that has previously had VSTOR & VSTORSP1 installed.

The problem occurs when an end user installs VSTOR followed by VSTORSP1 then subsequently uninstalls VSTOR from the Add/Remove Programs wizard. The uninstall removes the entire product including the service pack but fails to update the registry keys that our bootstrapper uses to detect if VSTOR is installed. If a user then installs a customization using the bootstrapper it will incorrectly detect that VSTOR is installed and proceed to install VSTORSP1, at which point it fails.

I recently responded to a customer on the VSTO forums ( http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/2dd02b04-cc89-47c3-8f76-462ecfbee65e ) regarding this issue where I approached it from an end-user perspective, providing them with a list of fixes for post-deployment use. The purpose of this article is to provide a solution that developers can utilize so that end-users machines do not require post-deployment modification. 

This workaround will allow developers to bake the correct VSTOR detection logic into every customization they develop that utilizes the bootstrapper. 

Here is what you need to do:

  1. On the development machine locate the file %ProgramFiles%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\VSTOR30\product.xml
  2. Replace the element
    <RegistryCheck Property="VSTORuntimeInstalled" Key="HKLM\SOFTWARE\Microsoft\VSTO Runtime Setup\v9.0.21022" Value="Install"/>
    with 
    <MsiProductCheck Property="VSTORuntimeInstalled" Product="{8FB53850-246A-3507-8ADE-0060093FFEA6}"/>
  3. Alter the element
    <BypassIf Property="VSTORuntimeInstalled" Compare="ValueGreaterThanOrEqualTo" Value="1"/>
    to be
    <BypassIf Property="VSTORuntimeInstalled" Compare="ValueGreaterThanOrEqualTo" Value="3"/>

And that’s it! Now that you have made these changes to your product.xml, every VSTO customization you build and deploy with a bootstrapper will correctly detect if VSTOR is installed regardless of what state the end-users machine is in.

Leave a Comment
  • Please add 7 and 2 and type the answer here:
  • Post
  • PingBack from http://www.clickandsolve.com/?p=4626

  • Very nice!

    This will save us support calls in the future...

  • It worked.

    I encountered another problem, on a Vista system VSTO installer wants .NET 3.5 SP1.

    On a XP system it is working without asking for .NET 3.5 SP1.

    Thanks.

  • Thanks for this post - I had tried to clean a test machine by uninstalling everything and was beginning to think I was going mad!

    BTW: Why is VSTO deployment such a minefield???

  • Thanks a lot , u saved my whole day.

  • Ufff... Finally one great expert that know the stone's way ! Thanks Friend !

  • The situation still exists in VSTOR40.

    How do I do this in VSTOR40? Are the keys the same? I guess not .... What changes do I need to make to the Product.xml file for VSTOR40?

  • Hi

    for step 1) What do you mean by the development machine? Is it the computer that the error pops up on?

    2) How do I get into replacing the element? is this done in command prompt

    Thanks

Page 1 of 1 (8 items)

VSTO Runtime bootstrapper package failure causes deployed customization installation to fail (Aaron Cathcart)