How do I AppSearch for DotNet Framework?
Question
How do I AppSearch for Dot Net Framework?
Answer
The official registry key/value to check is HKLM\Software\Microsoft\NET Framework Setup\NDP\@Install=1. Of course, this key/value has the same issue as you mention below because the version will continue to change until 2.0. Previous versions of the framework will sit here too.
Content credit also belongs to
- Aaron, Windows Media Center PM. You can get other Aaron insights about developing for Windows Installer from Aaron's Blog
[Author: Robert Flaming]
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at https://www.microsoft.com/info/cpyright.htm.
Comments
- Anonymous
August 26, 2005
Actually, the NDP version is in there (implied by the statement "because the version will conitnue to change" so the path is more like ...NDPv1.1.4322@Install=1 for .NET 1.1.
Also note that these values don't exist for .NET 1.0 on Tablet PC and eHome (Media Center) and you have to use an alternative means to determine if .NET is installed. See http://blogs.msdn.com/astebner/archive/2004/09/14/229802.aspx for details. - Anonymous
August 26, 2005
Heath is correct. The full path to the registry value to use to detect the presence of the .NET Framework 1.1 is HKLMSoftwareMicrosoftNET Framework SetupNDPv1.1.4322@Install=1
The major/minor version for the .NET Framework 2.0 has been locked down now too. So the detection for that will use HKLMSoftwareMicrosoftNET Framework SetupNDPv2.0.50727@Install=1 once 2.0 ships.
Also, I have posted sample code that might be useful in this problem space. It can be used by a bootstrapping program to detect the presence or absence of the .NET Framework 1.0 or 1.1 and service pack level for each. You can find more info about that at http://blogs.msdn.com/astebner/archive/2004/09/18/231253.aspx. - Anonymous
August 27, 2005
What am I missing here? Why would you AppSearch for the framework when there's the MsiNetAssemblySupport property to tell you if it's installed? I can't think of a scenario where AppSearch would be useful when there's a property for presence of the framework. - Anonymous
August 27, 2005
Yes. What Heath and Aaron said ;^) Thanks. - Anonymous
December 10, 2006
These seem to me to be extremely useful. Just reproducing here for my own sake. MSI2XML / XML2MSIA Windows