Is there a command line command for verifying what version of .NET is installed

前端 未结 9 896
孤街浪徒
孤街浪徒 2020-12-07 16:44

I have set of scripts for doing scripted installs. You can use the scripts on any server 2008 machine. However, I need to check if .NET 3.5 has been installed (before the

9条回答
  •  孤街浪徒
    2020-12-07 17:10

    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.

提交回复
热议问题