How to detect what .NET Framework 1.1 service pack is installed

I have seen a few questions on the newsgroups about how to determine whether or not the .NET Framework 1.1 SP1 is installed on your machine. A colleague pointed me to a KB article that describes a method of looking at file versions to determine this. We created a new registry hive that started getting installed in the .NET Framework 1.1 specifically to address this and a few other types of detection issues and make this simpler for 3rd party developers, so I wanted to quickly outline how to check for this in the .NET Framework 1.1 and new versions moving forward (it will take a bit for my request to have that KB article updated to go into effect on the live KB site).

Basically you need to query for the existence of a registry value and then check the data in that value. Here is where it is located:

  • Key Name: HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322
  • Value: SP
  • Data type: REG_DWORD

The data in this SP value tells you which service pack is installed for the .NET Framework 1.1. For future versions of the .NET Framework, you will just need to change the part of the key named v1.1.4322 to be the version you are interested in.

Note that this method cannot be used to tell you whether or not you have any QFE's or GDR's installed for the .NET Framework. If anyone out there needs to be able to detect on this granular of a level, let me know via a comment or email and I can dig into this further.

There are also other alternative ways of detecting the presence of the .NET Framework 1.0 service packs, I will post something about that when I figure out the exact details of how to do that.

Hope this helps....