For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
16 0 0 1

How to check if Eikon is installed on user machine

Hello, I am an Eikon user. I am developing an application using the .NET API. I have a requirement to check if Eikon is installed on user machine. This is to set the market data source as users may have other sources.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
38.1k 71 35 53

@rajeesh.r

You can write a .NET application to get a list of installed programs. I found one solution in the StackOverflow.

My code is:

        public void FindEikonOnHKCU()
        {
            Console.WriteLine("\nFind Eikon on the HKCU\n=================");
            string registry_key = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
            using (Microsoft.Win32.RegistryKey key = Registry.CurrentUser.OpenSubKey(registry_key))
            {
                foreach (string subkey_name in key.GetSubKeyNames())
                {
                    using (RegistryKey subkey = key.OpenSubKey(subkey_name))
                    {
                        if (subkey.GetValue("DisplayName") != null)
                        {
                            var name = subkey.GetValue("DisplayName").ToString();
                            if (name.Contains("Eikon"))
                            {
                                Console.WriteLine(subkey.GetValue("DisplayName"));
                            }
                        }
                    }
                }
            }
        }
        public void FindEikonOnHKLM()
        {
            Console.WriteLine("\nFind Eikon on the HKLM\n=================");
            //string registry_key = @"SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall";
            string registry_key = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
            using (Microsoft.Win32.RegistryKey key = Registry.LocalMachine.OpenSubKey(registry_key))
            {
                foreach (string subkey_name in key.GetSubKeyNames())
                {
                    using (RegistryKey subkey = key.OpenSubKey(subkey_name))
                    {
                        if (subkey.GetValue("DisplayName") != null)
                        {
                            var name = subkey.GetValue("DisplayName").ToString();
                            if (name.Contains("Eikon"))
                            {
                                Console.WriteLine(subkey.GetValue("DisplayName"));
                            }
                        }
                    }
                }
            }
        }

It looks for the Eikon application in the SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall key of the HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER registries.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
16 0 0 1

Thanks a lot for the solution. It works.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea