zoukankan      html  css  js  c++  java
  • 通过读取注册表获得 MediaPlayer the highest version.

    using System;
    using Microsoft.Win32;

    namespace PublicBill.RegeditAction
    {
        
    class RegeditAction
        
    {
            [STAThread]
            
    static void Main(string[] args)
            
    {
                
    string mediaPlayerVersion = new RegeditAction().GetRegeditData();

                Console.WriteLine(
    "Windows Media Player Version: " + mediaPlayerVersion);
            }


            
    /// <summary>
            
    /// Get local machine the highest version of media player.
            
    /// </summary>
            
    /// <returns></returns>

            private string GetRegeditData()
            
    {
                RegistryKey localMachine 
    = Registry.LocalMachine;
                RegistryKey software 
    = localMachine.OpenSubKey("SOFTWARE");
                RegistryKey microsoft 
    = software.OpenSubKey("Microsoft");
                RegistryKey mediaPlayer 
    = microsoft.OpenSubKey("MediaPlayer");
                RegistryKey playerUpgrade 
    = mediaPlayer.OpenSubKey("PlayerUpgrade");

                
    string registData = playerUpgrade.GetValue("PlayerVersion""have no this value.").ToString();

                
    return registData;
            }


        }

    }

  • 相关阅读:
    解决VMwave下卡死的办法
    深度探索C++对象模型第四章:函数语义学
    cc
    tbb库的使用
    10内核同步方法
    哈希
    django 和restful framework 初始配置轻松搞定
    linux有趣动画--代码雨
    linux有趣开机图标--佛祖保佑
    Socket是什么,通俗易懂点说
  • 原文地址:https://www.cnblogs.com/publicbill/p/269637.html
Copyright © 2011-2022 走看看