Login Register






[AutoIt]Getting installed .NET framework versions filter_list
Author
Message
[AutoIt]Getting installed .NET framework versions #1
Required
Code:
#include <File.au3> #include <Array.au3>


Function
Code:
Func GetInstalledDotNetVersions() ;By 1234hotmaster $dotnet = _FileListToArray(@WindowsDir & "\Microsoft.NET\Framework\","*",2) _ArrayDelete($dotnet,0) If @error Then Return Return $dotnet EndFunc

I know its VERY simple but it might be interesting for some people Smile

This function returns an array with all versions of .NET installed.
(This post was last modified: 11-26-2011, 08:03 AM by Skullmeat.)
Pierce the life fibers with your drill.

Reply

RE: [AutoIt]Getting instlled .NET framework versions #2
Nice, I actually wrote a vbs script for this too. I might as well post it here since there's no where else on the forum for it, and it relates to the same idea as this script you have.

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"

4 is a bit iffy though, some people seem to have it shown in a different place in the registry for some reason. Maybe the difference between getting it through a windows update or installing it manually? not sure yet.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: [AutoIt]Getting installed .NET framework versions #3
cool! but the script i made is even for future frameworks... Your code checks for hardcoded registry values but mine gets the folders in the Microsoft.NET/Framework Smile

btw i think you can post it in [link=http://www.hackcommunity.com/Forum-Batch-and-Shell-Scripting]This[/link] and i think it would be the best of all the threads in that section because all of them are fork bombs with the threads author's labeling them as "Viruses" Biggrin
(This post was last modified: 11-26-2011, 08:06 AM by Skullmeat.)
Pierce the life fibers with your drill.

Reply

RE: [AutoIt]Getting installed .NET framework versions #4
True, I could change it around to work the way yours does, but any missing frameworks I wouldn't be able to show. I might anticipate a framework 5.5, and they come out with a 5.1 or 5.2 if I wanted to have placeholders for them like my current script has, and then it wouldn't work. But obviously if you use your script... Whatever it doesn't return, means you don't have that framework, so I guess it's good enough lol
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply