MSFN Forum: How to check what version of .NET Framework you have installed - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to check what version of .NET Framework you have installed Good things often come in small packages.. Rate Topic: -----

#1 User is offline   Zaitzev 

  • Newbie
  • Group: Members
  • Posts: 22
  • Joined: 13-February 10
  • OS:Windows 7 x64

Posted 17 February 2010 - 11:29 PM

I did some searching and found a nice little tool you can use to find out what versions of .NET Framework you have installed, just in case they aren't visible in the Add/Remove section. It's small, doesn't install and gives an optional download-link for any missing framework! :)

Download link is at the bottom of the article: Read more


#2 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,352
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 18 February 2010 - 11:27 AM

Thank you for that information, but you check which version of net with this VBS script.
Save As NFWVersion.vbs

Quote

Dim Act :Set Act = CreateObject("Wscript.Shell")
Dim Obj, Rg1, Rst

Dim Reg :Reg = Array( _
  "1 - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\1.0.3705\Version", _
  "1.1 - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\1.1.4322\Version", _
  "2 - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727\Version", _
  "3 - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Version", _
  "3.5 - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5\Version")
On Error Resume Next 
    For Each Obj In Reg
     Rg1 = Split(Obj," - ")
     If IsNull(Act.RegRead(Rg1(1))) Then
      Rst = Rst &  "Missing Net Frame Work : " & Rg1(0) & vbCrLf 
     Else
      Rst = Rst &  "Confirm Net Frame Work : " & Rg1(0) & " - " & Act.RegRead(Rg1(1)) & vbCrLf 
     End If
    Next 

    MsgBox Rst, 4128,"Net Framework Info"




#3 User is offline   Zaitzev 

  • Newbie
  • Group: Members
  • Posts: 22
  • Joined: 13-February 10
  • OS:Windows 7 x64

Posted 18 February 2010 - 02:06 PM

My point was that the small app is an easy way for anyone who wants to do it quick and easy, instead of creating and writing files like you just did... Obviously there's more than one way to figure out what versions are installed on a system..

#4 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,352
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 18 February 2010 - 03:07 PM

I was just showing how easy it was to write something up, why use a 3rd party
app when a few lines of code will do.

#5 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,364
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 18 February 2010 - 06:32 PM

Why bother even going that far!

Just open the run box WinKey + R, enter the following text and choose OK
cmd /c dir/b/ad "%systemroot%\Microsoft.NET\Framework"&pause
What more do you need?

#6 User is offline   spriditis 

  • Newbie
  • Group: Members
  • Posts: 19
  • Joined: 26-February 10
  • OS:XP Pro x86
  • Country: Country Flag

Posted 05 March 2010 - 06:15 PM

gunsmokingman - there is a problem with vbs script:

For .Net Fw 1.1 - there is no "Version" value in [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322]
I have installed:
.Net FW 1.1 - dotnetfx.exe
SP1         - NDP1.1sp1-KB867460-X86.exe
Security Update - NDP1.1sp1-KB928366-X86.exe

Actually, the idea was to enumarate keys and the name of that key would give version..
But "SP" value gives correct data for last installed Service Pack, though..

And I haven't used 1.0 in ages, so verify about that..
------------------
Yzöwl:
Just listing folder will give you false results - because updates tend to create folders for version that isn't installed. Like on my Windows XP SP3 (with 3.5 SP1 [contains 2.0 SP2, 3.0 SP2, 3.5 SP1]):
v1.0.3705
v1.1.4322
v2.0.50727
v3.0
v3.5

Folders v1.0.3705 and v1.1.4322 contain just few files from security updates (.config, .cfg and mscormmc.dll).

The correct way is to enumarate registry....

----------------
Edit2:

For .Net FW 1.0 (With SP3) the reg key is
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\Full\v1.0.3705]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\Full\v1.0.3705\1033\Microsoft .NET Framework Full v1.0.3705 (1033)]
"install"=dword:00000001
But no Version or SP value.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\Product\Microsoft .NET Framework Full v1.0.3705 (1033)]
"Version" - shows the same data as key name..

This post has been edited by spriditis: 05 March 2010 - 07:10 PM


#7 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,364
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 06 March 2010 - 08:09 AM

Since we know that the installers for .NET FW result in a listing under Win32_Product whats wrong with using this VBScript?
NetVerIs.vbs
strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Product")

For Each objItem in colItems
	If InStr(objItem.Name, "Microsoft .NET Framework") > 0 Then
		Wscript.Echo objItem.Version
	End If
Next


#8 User is offline   spriditis 

  • Newbie
  • Group: Members
  • Posts: 19
  • Joined: 26-February 10
  • OS:XP Pro x86
  • Country: Country Flag

Posted 06 March 2010 - 12:21 PM

yap, sometime, you just think "why didn't I though f that" ;)

I suppose, this would get less overhead:
Set colItems = objWMIService.ExecQuery("Select Name, Version from Win32_Product Where Name Like 'Microsoft .NET Framework%'")
For Each objItem in colItems
	Wscript.Echo objItem.Name & " - " & objItem.Version
Next


#9 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,352
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 06 March 2010 - 12:31 PM

Yzöwl, there was a reason why I did not use the Win_32 Product to list version of net installed, it did not return any results on my computer.

Posted Image

My script I guessed at Reg key for netframework 1 and netframework 1.1, the rest of the keys are from my Windows 7 x64.
If anyone with netframework 1 or netframework 1.1 installed could post the correct key path and value that would help.

#10 User is offline   Oxygen 

  • Newbie
  • Group: Members
  • Posts: 25
  • Joined: 29-October 09

Posted 12 August 2011 - 08:04 PM

View PostYzöwl, on 18 February 2010 - 06:32 PM, said:

Why bother even going that far!

Just open the run box WinKey + R, enter the following text and choose OK
cmd /c dir/b/ad "%systemroot%\Microsoft.NET\Framework"&pause
What more do you need?


thank u

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy