Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Mediaplayer version checking

Mediaplayer version checking

Scheduled Pinned Locked Moved C#
csharphelpquestionannouncement
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rakeshs312
    wrote on last edited by
    #1

    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

    L A 2 Replies Last reply
    0
    • R rakeshs312

      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

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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
      }

      R 1 Reply Last reply
      0
      • L Lost User

        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
        }

        R Offline
        R Offline
        rakeshs312
        wrote on last edited by
        #3

        Thanks for the replay, stancrm.

        1 Reply Last reply
        0
        • R rakeshs312

          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

          A Offline
          A Offline
          Akhmad Suaidi
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups