I want to know the .NET version. I am trying this to check for .NET 3.5 but not getting any success. I am not getting message box.

SET Variable %DOTNET_FRAMEWORK% to Function:Get System Info(.NET Status) for "$NET_FRAMEWORK_35$"
If %DOTNET_FRAMEWORK% Equals "1" Then
Else
Display Message Box "Please install .NET 3.5" -- "My Soft"
End


Also I want to get if the .NET SP1 is installed ? Please provide script code to check if .NET SP1 is installed or not.