N
N
nubic2017-04-21 15:20:21
.NET
nubic, 2017-04-21 15:20:21

Where to look for 1C in the registry (C#)?

I'm trying to find a thin client in the registry like this:

RegistryKey ThinClient = Registry.LocalMachine.OpenSubKey("Software").OpenSubKey("1C");

            if (ThinClient != null)
            {
                RegistryKey isLoaded = ThinClient.OpenSubKey("1C:Enterprise 8 Thin client (8.3.9.2170)");

                if (isLoaded != null)
                {
                    Process ThinClientRun = new Process();
                    ThinClientRun.StartInfo.FileName = "cmd.exe";
                    ThinClientRun.StartInfo.Arguments = @"/C cd " + Application.StartupPath + "/bin & load.bat " + DB.User.Name;
                    ThinClientRun.Start();
                }
            }

But ThinClient is already null, and other programs find it calmly, but with 1C such a moment .. Tell me what needs to be fixed, maybe there is another way to check if the thin client is installed on the machine

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question