You mean a DOS command such as below will do the job displaying installed .NET frameworks:
wmic /namespace:\\root\cimv2 path win32_product where "name like '%%.NET%%'" get version
The following may then be displayed:
Version
4.0.30319
WMIC is quite useful once you master using it, much easier than coding WMI in scripts depending on what you want to achieve.