locked
How can I check which Office interops are installed on a Windows machine?

    Question

  • I'm using Advanced Installer to create a setup app for my VB.Net app. I need it to check if Office 2003/2007 or 2010 interops are installed on the target machine. If not, it will stop the installation and ask the user to manually install the interops (using the Office Setup to install Net Programmability Support).

    I tried looking for the interop files in the Windows\Assembly folder but that seems to be a virtual folder which does not really house the files.

    Is there a registry key I can search to see if the interops are installed?

    Note I am NOT after the Office version, but checking whether the interops are installed. Thanks.
    • Changed type JDMils1968 Sunday, May 15, 2011 5:06 AM Sorry
    Sunday, May 15, 2011 5:06 AM

Answers

  • If you are using Visual Studio Setup Project to deploy your VB.Net applciation, you could add the prerequisite for Office PIA:

    On the other hand, if you want to know if the Office is installed in the client machine, you could check the registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\[Office Version Number]\Common\ProductVersion

    For Office 2010, [Office Version Number] is 14.0.xx.  Office 2007 is 13.0.xx.

     

    Sincerely,


    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, May 17, 2011 10:19 AM
    Moderator

All replies

  • If you use Late Binding, you don't need to check the installed Interop assemblies.

    Please think of using Late binding to automate Office applications.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Tuesday, May 17, 2011 6:37 AM
  • If you are using Visual Studio Setup Project to deploy your VB.Net applciation, you could add the prerequisite for Office PIA:

    On the other hand, if you want to know if the Office is installed in the client machine, you could check the registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\[Office Version Number]\Common\ProductVersion

    For Office 2010, [Office Version Number] is 14.0.xx.  Office 2007 is 13.0.xx.

     

    Sincerely,


    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, May 17, 2011 10:19 AM
    Moderator
  • I check HKLM/Software/Microsoft/vsto runtime setup/v4R. But I think I figured that out from this http://social.msdn.microsoft.com/Forums/en/vsto/thread/859192ec-28d4-426c-bcfb-90739880c70e
    Wednesday, August 03, 2011 5:39 PM
  • "Office 2007 is 13.0.xx."

    Office 2007 is actually 12.0.xxxx.xxxx.  Not 13. 


    Wednesday, May 09, 2012 7:54 PM
  • yeah, they skipped 13 ... imagine that.


    Mitch Bird

    Tuesday, September 25, 2012 3:55 PM