How about a function MS_DotNET_Framework()
Return -1 if the .NET framework is not installed else return the version of the framework installed.
Return -1 if the .NET framework is not installed else return the version of the framework installed.