|
-
Nov 13th, 2009, 08:29 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] Get Framework Version
I am making a little Diagnostic Test app to check that certain folders and files exist.
I would also like to list some system specs, i have almost all the ones i need except the currently installed framework version.
I have search the My.Computer libraries and in the help but cannot get the framework version to display in a listbox.
How to get the framework version into a string?
regards
toe
-
Nov 13th, 2009, 08:35 PM
#2
Re: Get Framework Version
Do you mean the version that the current app is targeting or all versions installed, because a single system could have every version installed simultaneously? If it's the former then the Environment.Version property would be what you need. If it's the latter you would have to go to the Registry or the file system.
-
Nov 13th, 2009, 08:49 PM
#3
Thread Starter
Frenzied Member
Re: Get Framework Version
Its the latter, after looking in file system it doesn't seem to be there so i think ill skip on the framework versions because after doing a search for it in the registry it looks far to complicated for me.
regards
toe
-
Nov 14th, 2009, 12:57 AM
#4
Hyperactive Member
Re: Get Framework Version
No it's not that complicated 
VB.Net Code:
Dim installed_versions As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\NET Framework Setup\NDP") Dim version_names As String() = installed_versions.GetSubKeyNames() 'now you have them in array 'version_names' and you can do what you wanna... 'to get them in string... Dim NETversions As String = String.Join(" ; ", version_names) 'NETversions string on my comp is "v1.1.4322 ; v2.0.50727 ; v3.0 ; v3.5"
Ahh, and for net 1 is diferent reg key... search it on google if you need net 1
-
Nov 14th, 2009, 01:26 AM
#5
Thread Starter
Frenzied Member
Re: Get Framework Version
Sweet, i only need to know if they have 2.0 at the present time
Thanks heaps
-
Nov 14th, 2009, 02:53 AM
#6
Re: [RESOLVED] Get Framework Version
VB.NET MVP 2008 - Present
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|