locked
Is it possible to create single WIX installer for 32 & 64 bit Outlook addin RRS feed

  • Question

  • Hi,

    I'm having some trouble trying to figure out how to create a general install for my Outlook VSTO addin.  I've seen quite a few addins that only have a single installer to download that works for both 32 and 64 bit version of Outlook and want to be able to offer the same.  Currently I am using WIX to package my addin and have to decide at compilation time whether to package as a 32 or 64-bit install.

    As far as I know the only thing that differs for a 64-bit and 32-bit addin is where Outlook looks in the registry, so either HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins (for 32-bit or 64-bit Outlook on same bit OS) or HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Outlook\Addins (for 32-bit Outlook on 64-bit OS).

    Can I write something in WIX that attempts to write in the registry and both these locations if they exist, therefore covering all possible scenarios for 32/64-bit?

    The code I am using at the moment is:

    <RegistryKey Root="HKLM"  Action="createAndRemoveOnUninstall"
                         Key="Software\Microsoft\Office\Outlook\Addins\MyAddin">
              <RegistryValue Name="Description" Value="MyAddin" Type="string" Action="write" />
              <RegistryValue Name="FriendlyName" Value="MyAddin" Type="string" Action="write" />
              <RegistryValue Name="LoadBehavior" Value="3" Type="integer" Action="write" />
              <RegistryValue Name="Manifest" Value="[#FILE_VstoManifest]|vstolocal" Type="string" Action="write" KeyPath="yes"/>
            </RegistryKey>

    Would I need to change any of this, or does this currently write in the correct place by default?

    Is there a difference also when installing as local machine or current user when it comes to bit versions, or are these irrelevant?

    Finally, the manifest value has to point to the correct installation location, which can either be in Program Files or Program Files (x86) depending on the Outlook bit and OS bit, how would I account for these during the installation so that it always installs in the correct place and the manifest points to the correct directory?

    Thanks a lot for any help in advance!

    Tom

    Tuesday, May 19, 2015 2:15 PM

Answers

  • Hi,

    Thanks for all the responses.  If anyone is interested I was able to solve this problem using Gavin's method posted in his blog here.

    He uses the reg.exe command to copy the registry values from the Wow6432Node to the normal registry root on HKLM.  This will silently fail on a 32-bit OS, but on a 64-bit OS it ensures that both Outlook 32 & 64 bit can open the installed addin.  The addin itseld is installed always in the Program Files (x86) on a 64-bit OS, or the normal Program Files folder on a 32-bit OS.

    Hope this helps others out.

    Tom

    • Marked as answer by moatak787 Friday, May 22, 2015 10:45 AM
    Friday, May 22, 2015 10:45 AM

All replies

  • Usually when installing a VSTO addin the C2R type installation is used, and that takes care of the bitness and where to install and register for you. Is there a reason you aren't using a C2R installation?

    Ken Slovak MVP - Outlook

    Tuesday, May 19, 2015 2:45 PM
  • Hi Ken,

    Does C2R installation support Outlook 2010 as well as 2013?

    We had a Wix installation built for us a while back because we had trouble checking for the .Net 4.0 and VSTO 2010 prerequisites before installation with the standard visual studio 2013 deployment options.

    Is Click to Run customisable in terms of being able to show a EULA and have your own icon for the installer also?

    Thanks,

    Tmo

    Tuesday, May 19, 2015 2:52 PM
  • Yes, you can use Outlook 2010 and 2013 with a C2R installation.

    You can set prerequisites from the Prerequisites button including the Framework and VSTO Tools for Office Runtime.

    The installer icon and EULA are not customizable for C2R from VS.

    If you use a Windows installer setup project you can customize those attributes as well as many others, but in that case you need separate installers for x86 and x64.


    Ken Slovak MVP - Outlook

    Tuesday, May 19, 2015 3:27 PM
  • Ken,

    >> Usually when installing a VSTO addin the C2R type installation is used

    How is the C2R technology related to VSTO??? 

    Most probably you are talking about ClickOnce. If so, see Deploying an Office Solution by Using ClickOnce for more information.


    Tuesday, May 19, 2015 3:49 PM
  • Hi Tom,

    As far as I know, we can use Windows installer and ClickOnce to public the Office solutions. And here is an helpful article for your reference:
    Deploying an Office Solution

    >>Is it possible to create single WIX installer for 32 & 64 bit Outlook addin<<

    I would suggest that you get support from WIX's official site for the WIX issues.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 20, 2015 5:20 AM
  • Hi,

    Thanks for all the responses.  If anyone is interested I was able to solve this problem using Gavin's method posted in his blog here.

    He uses the reg.exe command to copy the registry values from the Wow6432Node to the normal registry root on HKLM.  This will silently fail on a 32-bit OS, but on a 64-bit OS it ensures that both Outlook 32 & 64 bit can open the installed addin.  The addin itseld is installed always in the Program Files (x86) on a 64-bit OS, or the normal Program Files folder on a 32-bit OS.

    Hope this helps others out.

    Tom

    • Marked as answer by moatak787 Friday, May 22, 2015 10:45 AM
    Friday, May 22, 2015 10:45 AM