none
Problems getting my COM add-in to install on Excel 2010 Home & Student edition installed via Click To Run RRS feed

  • Question

  • One of my users is having trouble installing my shared COM add-in (built with VB.net / VS 2010) on his system. My installer is reporting that it can't find a copy of Excel 2003 or better on the user's machine. It's looking for one of a number of key registry locations to determine if a supported version of Excel is on his machine:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\11.0|12.0|14.0\Excel\InstallRoot

    Since he's running Excel 2010 Home & Student edition (x86 on Win 7 x64) I would expect to see the following registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Excel\InstallRoot

    but this key does not exist on the user's machine.

    I have a diagnostic utility that I wrote to dump out various parts of the user's registry and this is what it reports for this user's machine:

    HKLM\SOFTWARE\Wow6432Node\Microsoft\Office(Keys Only, limit to 4 levels)=
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common\InstallRoot]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVH]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVH\Click2runExcel]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVH\Click2runOneNote]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVH\Click2runOneNoteProxy]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVH\Click2runOWSSuppProxies]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVH\Click2runPowerPoint]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVH\Click2runWord]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVH\Connect]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVH\{90140011-0061-0409-0000-0000000FF1CE}]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVHSettings]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVHSettings\{90140011-0061-0409-0000-0000000FF1CE}]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Common]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Common\Smart Tag]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Common\Smart Tag\Actions]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Common\Smart Tag\Recognizers]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Delivery]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Delivery\SourceEngine]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Delivery\SourceEngine\Downloads]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Delivery\SourceEngine\Settings]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Excel]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Excel\AddIns]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Excel\AddIns\PXCOfficeAddin4.Addin]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Outlook]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Outlook\Addins]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Outlook\Addins\Search.OutlookToolbar]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\PowerPoint]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\PowerPoint\AddIns]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\PowerPoint\AddIns\PXCOfficeAddin4.Addin]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Publisher]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Publisher\AddIns]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Publisher\AddIns\PXCOfficeAddin4.Addin]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Word]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Word\AddIns]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Word\AddIns\PXCOfficeAddin4.Addin]

    I note that the following key does exist:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common\InstallRoot

    Do I have to do something different with ClickToRun installations?

    Any help would be greatly appreciated.

    For the past 3 or so years I have used the following code to determine what version of Excel is installed on the machine:

    Private Function GetVersion() As String
    
     ' returns 9.0 10.0 11.0 12.0 etc or 0.0 if not found
     Dim regPath As String = ""
    
     Try
    
      For i As Integer = 9 To 16
       regPath = GetHKLMSoftwareRootPath() & "\Microsoft\Office\" & i & ".0\" & OfficeApp
       Dim regKey As RegistryKey = Registry.LocalMachine.OpenSubKey(regPath, False)
       If regKey IsNot Nothing Then
        regKey.Close()
        GetVersion = i & ".0"
        Exit Function
       End If
      Next
    
     Catch ex As Exception
    
      If bVerbose Then
       jwMsgBoxError("Exception in GetOLVersion: " & regPath & vbLf & ex.Message)
      End If
    
     End Try
    
     GetVersion = "0.0"
    
    End Function
    
    Private Function GetHKLMSoftwareRootPath() As String
    
     ' bOffice64 is set to true if the 64-bit version of Office is installed
     If bOffice64 Then
      GetHKLMSoftwareRootPath = "SOFTWARE"
     Else
      GetHKLMSoftwareRootPath = "SOFTWARE\Wow6432Node"
     End If
    
    End Function
    

    Saturday, May 5, 2012 2:28 PM

Answers

  • Hi,

    Yes, you're right. Click-To-Run products are virtualized software. As they're designed to be compatible with other instaleld software, they writes different registry keys while installing.  So you installer need to be updated with the verification key. Take Outlook 2010 as example, you check if it's virtualized by:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Office\14.0\Common\InstallRoot\Virtual\VirtualOutlook

    Refer to: http://msdn.microsoft.com/en-us/library/ff522355.aspx

    Btw, you'd better install the VSTO solution(*.vsto) with Click-To-Run Excel before you create installer for it. 

    Note that there're known issue while running VSTO solutions with Click-To-Run Office.  Once the addin depends on traidational registry keys, it will be likely to fail, refer to: (Click-to-Run: Known issues) http://office.microsoft.com/en-us/excel-help/click-to-run-known-issues-HA101850565.aspx?CTT=3

    Hope this gets you started.

    regards,


    Forrest Guo | MSDN Community Support | Feedback to manager


    Monday, May 7, 2012 7:56 AM
    Moderator
  • Thanks. My add-in is not VSTO based but once I discovered that the traditional registry key I used to check for with Excel 2000, 2002, 2003, 2007 and 2010 are not created when using CTR, I ended up suggesting that the user convert his CTR installation into a regular MSI based one. Once he did that, the problem went away. I now have some time to figure out how to enhance my code to detect the CTR version of Excel.

    Monday, May 7, 2012 5:46 PM

All replies

  • Hi,

    Yes, you're right. Click-To-Run products are virtualized software. As they're designed to be compatible with other instaleld software, they writes different registry keys while installing.  So you installer need to be updated with the verification key. Take Outlook 2010 as example, you check if it's virtualized by:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Office\14.0\Common\InstallRoot\Virtual\VirtualOutlook

    Refer to: http://msdn.microsoft.com/en-us/library/ff522355.aspx

    Btw, you'd better install the VSTO solution(*.vsto) with Click-To-Run Excel before you create installer for it. 

    Note that there're known issue while running VSTO solutions with Click-To-Run Office.  Once the addin depends on traidational registry keys, it will be likely to fail, refer to: (Click-to-Run: Known issues) http://office.microsoft.com/en-us/excel-help/click-to-run-known-issues-HA101850565.aspx?CTT=3

    Hope this gets you started.

    regards,


    Forrest Guo | MSDN Community Support | Feedback to manager


    Monday, May 7, 2012 7:56 AM
    Moderator
  • Thanks. My add-in is not VSTO based but once I discovered that the traditional registry key I used to check for with Excel 2000, 2002, 2003, 2007 and 2010 are not created when using CTR, I ended up suggesting that the user convert his CTR installation into a regular MSI based one. Once he did that, the problem went away. I now have some time to figure out how to enhance my code to detect the CTR version of Excel.

    Monday, May 7, 2012 5:46 PM