-- This script returns the version of the highest .NET Framework installed function getDotNet() local strVersion = "0.0.0.0"; local DotNet_Key; -- retrieve keys from the registry tNETVersions = Registry.GetKeyNames(3, "SOFTWARE\\Microsoft\\NET Framework Setup\\NDP"); Table.Sort(tNETVersions); for i, key in pairs(tNETVersions) do DotNet_Key = "SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\" .. key; if (Registry.GetValue(HKEY_LOCAL_MACHINE, DotNet_Key, "Install", true) ~= "") then if (Registry.GetValue(HKEY_LOCAL_MACHINE, DotNet_Key, "Version", true) ~= "") then strVersion = Registry.GetValue(HKEY_LOCAL_MACHINE, DotNet_Key, "Version", true); else -- get the ver from the key name strVersion = String.Mid(key, 2, -1); end end end -- return last value (highest .NET Framework) return strVersion; end