Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect Windows Media pack installed on system

One of the components in my application is failing on Windows because Windows K/KN systems don't have Media Feature Pack installed. To prevent this I was thinking of adding a check during install time to see if Media Feature Pack is installed on the current system. However, I haven't found enough information about MFP to do so.

For most versions of Windows it's already installed but some Windows 8 and 8.1 installations don't have it. I need a programmatic way to do this.

I would need any one of the info to achieve this:

  1. Regkey based

What are the regkeys that can be used to determine if Media Feature Pack is installed? Does Media Feature Pack (like .NET framework / VC redistribution) set some regkey which can be used to determine this?

  1. Is there any API that can be used to detect Media Feature Pack?

  2. Are there any DLLs that can be used to for detection?

I know mf.dll and mfplat.dll are installed in sys32 folder, but can I rely on these two files for MFP detection?

like image 820
NxC Avatar asked Feb 12 '23 01:02

NxC


1 Answers

Found the answer and posting here if helps someone There is a registry key at:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\WindowsFeatures\WindowsMediaVersion

Some links:

http://support.microsoft.com/kb/922474

This will help you detect the actual windows flavor:

http://msdn.microsoft.com/en-us/library/ms724358%28v=vs.85%29.aspx

http://msdn.microsoft.com/en-us/library/aa394239%28v=vs.85%29.aspx

like image 172
NxC Avatar answered Feb 16 '23 04:02

NxC