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. .NET (Core and Framework)
  4. detecting media player

detecting media player

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpwindows-adminjsonhelp
2 Posts 2 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.
  • D Offline
    D Offline
    d_smit
    wrote on last edited by
    #1

    Hello All, In my vb.net application i am playing audio files using window media player. Sometimes application fails , if window media player is not installed on the user's machine. So, how it can be detect whether media plyer is available or not befor plying. Does any API exists using which we can retrieve data from system registry. Anyone who knows the answer, Please tell Any help will be highly appreciated. Thanks in advance.

    K 1 Reply Last reply
    0
    • D d_smit

      Hello All, In my vb.net application i am playing audio files using window media player. Sometimes application fails , if window media player is not installed on the user's machine. So, how it can be detect whether media plyer is available or not befor plying. Does any API exists using which we can retrieve data from system registry. Anyone who knows the answer, Please tell Any help will be highly appreciated. Thanks in advance.

      K Offline
      K Offline
      Kenny McKee
      wrote on last edited by
      #2

      If you want to detect whether media player is installed, you need to check whether or not the wmplayer.exe file exists in "[BOOTDRIVE]:\Program Files\Windows Media Player\wmplayer.exe". To do that, you need to check it when your main form loads. Example below: Imports System.IO Dim ProgramsPath As String = My.Computer.FileSystem.SpecialDirectories.ProgramFiles If File.Exists(ProgramsPath & "\Windows Media Player\wmplayer.exe") = False Then
          // Exit the application. or, whatever you want to do.
          Application.Exit()
      End If That should do it. Good luck with your program! :)

      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