Anybody have any advice on how to programmatically detect if Windows Media Player is installed?
I know about the registry setting look up, but don’t trust it since it’s more than a little misleading (uninstalled may not remove it). And I’ve considered just launching a video, but an error could be caused by something other than Media Player not being installed, so it’s not conclusive either.
Ideally, I’d prefer a solution which could be used from both my C++ application AND my NSIS installer. But my the C++ app is the most important, I’m willing to live with the registry hack in the installer.
Look at the
IsInstalledvalue under keyHKLM\Software\Microsoft\Active Setup\Installed Components\{22d6f312-b0f6-11d0-94ab-0080c74c7e95}. It is1if installed,0otherwise.See Detecting Windows Media Player from an Application.