tags:

views:

1966

answers:

2

How can I check whether Adobe reader or acrobat is installed in the system? also how to get the version? ( In C# code )

+5  A: 
using System;
using Microsoft.Win32;

namespace MyApp
{
    class Program
    {
        static void Main(string[] args)
        {
            RegistryKey adobe = Registry.LocalMachine.OpenSubKey("Software").OpenSubKey("Adobe");
            if (adobe != null)
            {
                RegistryKey acroRead = adobe.OpenSubKey("Acrobat Reader");
                if (acroRead != null)
                {
                    string[] acroReadVersions = acroRead.GetSubKeyNames();
                    Console.WriteLine("The following version(s) of Acrobat Reader are installed: ");
                    foreach (string versionNumber in acroReadVersions)
                    {
                        Console.WriteLine(versionNumber);
                    }
                }
            }
        }
    }
}
abmv
A: 

Thanks for answer, Predrag.

Predrag