RegCLR4Version

This variable retrieves the raw CLR (Common Language Runtime, Microsoft's .Net implementation) version number for .Net 4.x, if any, of either the Client or the Full profile. If present, this is the full version number of the .Net 4.x Client or Full installation on the target system, for example 4.0.04506.30.

Note: To test for .Net versions other than 4.x, use the MsiNetAssemblySupport or VersionCLR variables. To test for the .Net 4.0 Client or Full profiles separately, use the RegCLR4ClientVersion or the RegCLR4FullVersion variables.

Usage

You can refer to this variable as <RegCLR4Version>. Do not change its value; it has been carefully configured for cross-platform compatibility and is used internally by the installer. You can use this version number with runtime functions such as $vercmp to test for specific .Net 4.x versions. Alternatively, you can use the MsiNetAssemblySupport or VersionCLR variables.

You can compare version numbers directly using the standard relational operators < <= > >= = and <>, so a conditional expression like RegCLR4Version > 4.0 will do a proper version comparison, obviating the need for the $vercmp function.

Related topics

MsiNetAssemblySupport, RegCLR4ClientVersion, RegCLR4FullVersion, VersionCLR, System information variables