Batch Script to find the version of .Net framework installed on the PC


Method1:
@echo off
  setlocal
  set alias=Reg query "HKLM\Software\Microsoft\NET Framework Setup\NDP"
  FOR /F "TOKENS=6 DELIMS=\." %%A IN ('%alias%') DO set .NetVer=%%A
  ECHO The most current version of Net in use is %.NetVer%

Method2: dir %windir%\Microsoft.Net\framework\v*

Output:
C:\>dir %windir%\Microsoft.Net\framework\v*
 Volume in drive C has no label.
 Volume Serial Number is 60F4-4F6D

 Directory of C:\Windows\Microsoft.Net\framework

02/25/2016  04:56 AM              v1.0.3705
07/14/2009  10:37 AM              v1.1.4322
02/14/2017  09:27 AM              v2.0.50727
11/21/2010  08:26 AM              v3.0
10/14/2013  09:28 PM              v3.5
03/16/2017  09:37 AM              v4.0.30319
04/05/2016  02:03 PM              VJSharp
               0 File(s)              0 bytes
               7 Dir(s)  31,032,090,624 bytes free

C:\>

Comments

Post a Comment

Popular posts from this blog

vRA/vRO workflows

How to generate HPS Report for Windows