none
Issue in finding word 2010 in registry keys RRS feed

  • Question

  • Hello,

    I am developing a custom setup for installing add-in for Word 2010. In this setup, I want to check if Word 2010 is present on client's PC. For this I am verifying the registry entry HKCU\Software\Microsoft\Office\14.0\Word. This is working fine if user already opened Microsoft Word at least once. But if the user did not open the Word for at least once, no keys related to Word 2010 are present in registry and my setup is prompting that 'Word 2010 is not installed on this PC'.

    Please suggest me solution for finding if Word 2010 installed even if user did not open Word 2010 at least one time.

    Thanks in advance!!!

    Surya Praveen

    Tuesday, March 26, 2013 6:19 AM

Answers

  • Hi surya, 

    Your idea is rignt, you can check whether word is installed on pc by search the registry entry.

    I find a link which solve your question. and a helpful link.

    the code snippets as below:

    using Microsoft.Win32;
    
    // Check whether Microsoft Word is installed on this computer,
    // by searching the HKEY_CLASSES_ROOT\Word.Application key.
    using (var regWord = Registry.ClassesRoot.OpenSubKey("Word.Application"))
    {
        if (regWord == null)
        {
           // word is not installed
        }
        else
        {
           // install
        }
    }

    Thanks.

    • Marked as answer by Surya Praveen Wednesday, March 27, 2013 11:58 AM
    Wednesday, March 27, 2013 2:49 AM

All replies

  • Hi surya, 

    Your idea is rignt, you can check whether word is installed on pc by search the registry entry.

    I find a link which solve your question. and a helpful link.

    the code snippets as below:

    using Microsoft.Win32;
    
    // Check whether Microsoft Word is installed on this computer,
    // by searching the HKEY_CLASSES_ROOT\Word.Application key.
    using (var regWord = Registry.ClassesRoot.OpenSubKey("Word.Application"))
    {
        if (regWord == null)
        {
           // word is not installed
        }
        else
        {
           // install
        }
    }

    Thanks.

    • Marked as answer by Surya Praveen Wednesday, March 27, 2013 11:58 AM
    Wednesday, March 27, 2013 2:49 AM
  • Thank you Learning Hard!!! Your suggestion worked perfectly.

    Surya Praveen

    Wednesday, March 27, 2013 11:58 AM