How to check what version of Windows Media Player is installed on the machine?

后端 未结 3 1136
耶瑟儿~
耶瑟儿~ 2020-12-20 01:42

As far as I know Windows Media Player 10 is the minimum requirement for WPF MediaElement to work. What is a decent way to programmatically (from .NET) check if WMP is presen

3条回答
  •  青春惊慌失措
    2020-12-20 02:35

    i found this solution:

    FileVersionInfo inf = FileVersionInfo.GetVersionInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "Windows Media Player", "wmplayer.exe"));
            if (inf.FileVersion.StartsWith("9"))
            {...
    

提交回复
热议问题