有没有办法获得 Microsoft Office 版本及其在计算机上安装的许可证?

Is there a way to get the Microsoft Office Version and it's License installed on the Computer?

我正在尝试获取我的 PC 的规格。该系统用于监控计算机上安装的 Office 和 License。我必须在互联网上搜索它,但我什么也没看到。我正在使用 C#。

谁能帮我解决这个问题,谢谢你,问候

试一试

System.Diagnostics.ProcessStartInfo procStartInfo = new System.Diagnostics.ProcessStartInfo
            {
                WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal,
                FileName = "cmd.exe",
                RedirectStandardInput = true,
                UseShellExecute = false,
                Arguments = "/C reg query \"HKEY_CLASSES_ROOT\Word.Application\CurVer\""
            };


            procStartInfo.RedirectStandardOutput = true;
            procStartInfo.RedirectStandardError = true;
            procStartInfo.UseShellExecute = false;
            procStartInfo.CreateNoWindow = true;
            System.Diagnostics.Process proc = new System.Diagnostics.Process();
            proc.StartInfo = procStartInfo;
            proc.Start();
            string output = proc.StandardOutput.ReadToEnd();

            Console.WriteLine("Output: " + output);

            string version = System.Text.RegularExpressions.Regex.Replace(output, "(.*)(Word\.Application\.)(\d+)(.*)", "", System.Text.RegularExpressions.RegexOptions.Singleline);
            Console.WriteLine("Office version: " + version);

            Console.Read();

办公室 97 - 7

办公室 98 - 8

Office 2000 - 9

Office XP - 10

Office 2003 - 11

Office 2007 - 12

Office 2010 - 14

Office 2013 - 15

Office 2016 - 16