通過下面的註冊表項可以檢測機器上安裝的.NET Framework以及SP,語言包的版本。1..NET Framework
.NET Framework2.0
鍵:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727]
值:Install = 1
.NET Framework3.0
鍵:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0]
值:Install = 1
.NET Framework3.5
鍵:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5]
值:Install = 1
2.Service Pack(以2.0 SP1為例)
鍵:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727] 值:SP = 1
3.語言包(以簡體中文為例)
鍵:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727\2052]
值:Install = 1
更多語言請參考:http://msdn.microsoft.com/en-us/library/aa480243.aspx