I was recently looking at an application compatibility bug reported by a Windows Vista beta program customer. The bug stated that one particular Windows Media Center application refused to install on Windows Vista because it reported that Windows Media Center was not installed. Windows Media Center is a part of Windows Vista Home Premium and Ultimate editions, so the error message in this setup package was incorrect.
After further investigation, we found that the application setup was looking at the following registry value to determine whether or not the OS contained Windows Media Center:
- Key name: HKEY_LOCAL_MACHINE\SYSTEM\WPA\MediaCenter
- Registry value name: Installed
- Registry value data type: REG_DWORD
- Registry value data: 1
This particular registry value is a Windows product activation registry value that is specific to Windows XP, and it does not exist on Windows Vista at all. In addition, it was not documented as an official means of detecting whether or not Windows Media Center is present on the OS. Therefore using the above registry value to decide whether or not to allow installation of a Windows Media Center application is incorrect and should not be used.
Unfortunately, it does not look like we documented any official way that Windows Media Center application setup packages should use to detect the presence/absence or exact version of Windows Media Center installed on a system.
Here is the information about the registry key that we designed specifically to contain this version information. This key is used by Windows Media Center hotfixes to detect the exact version, and this key exists on both Windows XP Media Center Edition and Windows Vista:
- Key name: HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\Media Center
- Registry value name: Ident
- Registry value data type: REG_SZ
The Ident value will contain the following data depending on what version of Windows Media Center is present on the system:
- Windows Media Center 2002 - Ident values less than 2.7
- Windows Media Center 2004 - Ident values 2.7 and 2.8
- Windows Media Center 2005 - Ident value 3.0
- Windows Media Center 2005 with Update Rollup 1 - Ident value 3.1
- Windows Media Center 2005 with Update Rollup 2 - Ident value 4.0
- Windows Media Center for Windows Vista - Ident value 5.0
If you are creating a setup package for a Windows Media Center application, you should detect the presence of Windows Media Center before allowing installation of your application. Checking for the existence of the Ident value described above (regardless of the exact value string that it contains) will achieve that.
In addition, if your application has a dependency on a specific version of Windows Media Center, your setup package should also detect the presence of that specific version and block installation if it is not installed.
Additional information related to Windows Media Center hosted HTML applications can be found in the Windows Media Center SDK topic entitled Identifying Media Center from an HTML Page.