以编程方式检测是否已安装Windows Media Player [英] Programmatically detect if Windows Media Player is installed

查看:312
本文介绍了以编程方式检测是否已安装Windows Media Player的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人对如何以编程方式检测是否安装了Windows Media Player有任何建议吗?

Anybody have any advice on how to programmatically detect if Windows Media Player is installed?

我知道要查找注册表设置,但是不信任它,因为它可能会引起误解(未安装可能不会将其删除).而且我考虑过只是发布视频,但是由于未安装Media Player可能会导致错误,因此也不是确定性的.

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.

理想情况下,我希望可以在我的C ++应用程序和我的 NSIS 中使用的解决方案安装程序.但是我的C ++应用程序是最重要的,我愿意忍受安装程序中的注册表黑客攻击.

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.

推荐答案

查看键HKLM\Software\Microsoft\Active Setup\Installed Components\{22d6f312-b0f6-11d0-94ab-0080c74c7e95}下的IsInstalled值.如果已安装,则为1,否则为0.

Look at the IsInstalled value under key HKLM\Software\Microsoft\Active Setup\Installed Components\{22d6f312-b0f6-11d0-94ab-0080c74c7e95}. It is 1 if installed, 0 otherwise.

请参见从应用程序中检测Windows Media Player .

这篇关于以编程方式检测是否已安装Windows Media Player的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆