Mediaplayer version checking
-
Hi, When i click on a button ,it will check which version of mediaplayer is installed in that system. I am stucked here.What is the code for this in c#. Pls help
-
Hi, When i click on a button ,it will check which version of mediaplayer is installed in that system. I am stucked here.What is the code for this in c#. Pls help
string wmpExe = string.Concat(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"\Windows Media Player\wmplayer.exe");
if(File.Exists(wmpExe))
{
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(wmpExe);
// fileVersionInfo is the version info of WMP
} -
string wmpExe = string.Concat(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"\Windows Media Player\wmplayer.exe");
if(File.Exists(wmpExe))
{
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(wmpExe);
// fileVersionInfo is the version info of WMP
}Thanks for the replay, stancrm.
-
Hi, When i click on a button ,it will check which version of mediaplayer is installed in that system. I am stucked here.What is the code for this in c#. Pls help
Hi rakesh312, #1. Add a reference to your project point to \windows\system32\wmp.dll #2. add this one in top of code : using WMPLib; #3 to get media player version is something like this : WindowsMediaPlayer wmp = new WindowsMediaPlayer(); MessageBox.Show( wmp.versionInfo.ToString()); Good luck