Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checking Your Currently Installed .Net Framework Versions
#1
Here's a test VBS file I created that will check for entries of .Net Framework location's in the registry to determine which .Net Frameworks you currently have installed.

Save this as a ".vbs" file extension, and double click/open the file to see which ones you have installed. It will prompt you with a message box for the results.

Code:
Dim Action_ :Set Action_ = CreateObject("Wscript.Shell")
Dim Obj_, Ver, Respond

Dim Regstry :Regstry = 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", _
  "4 - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Version")
On Error Resume Next
    For Each Obj_ In Regstry
     Ver = Split(Obj_," - ")
     If IsNull(Action_.RegRead(Ver(1))) Then
      Respond = Respond &  "Not Installed: " & Ver(0) & vbCrLf
     Else
      Respond = Respond &  "Currently Installed: " & Ver(0) & " - " & "[" & Action_.RegRead(Ver(1)) & "]" & vbCrLf
     End If
    Next

    MsgBox Respond, 64,".Net Framework Information"

I believe this is very useful to this section of the forum for the .Net programming area

[Image: idjG2suCs.png]
Reply


Messages In This Thread
Checking Your Currently Installed .Net Framework Versions - by AceInfinity - 08-13-2011, 03:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  cegonsoft india | Learn dot net framework 3.5 & 4.0 for dot net jobs. MikeHenery9 0 1,489 09-09-2011, 04:30 AM
Last Post: MikeHenery9
  [Source] Find Installed Programs euverve 3 1,317 05-14-2011, 01:43 PM
Last Post: iCrack
  [VB.NET]Add .Net Framework 4 with your application(UPDATED) NathanE 11 2,586 05-31-2010, 10:08 PM
Last Post: Toχic
  .net framework questions. Irelandrulz2 4 1,299 04-28-2010, 04:20 PM
Last Post: trubufo

Forum Jump:


Users browsing this thread: 2 Guest(s)