473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Finding .NET CLR version and SP numbers

Hi All,

I need to establish that the machine on which my user intends to run
my program is at least .Net version 1.1 SP2 and am having a little
trouble figuring out how to do this.

I don't want the user to have to mess about with the Administrative
tools, or mmc.exe. I just need my program to figure out on first run
whether the environment supports a particular action.

I see that there is a property of the Environment class
called Version, which on my machine returns the numbers
1.1.4322.2032
It's not clear from this what the service pack is.

Microsoft say in KB318785 to look for a registry key

HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework
Setup\NDP\v1.1.4322

and the SP revision is given there.

This is great while .Net is still on version 1.1, but what happens
when it becomes version 1.2 ? That registry key probably won't
exist anymore. I don't want to have to distribute another version
of my program.

Is there a way I can find out whether the CLR version is
equal to or greater than Version 1.1 SP2 ?

Thanks for any suggestions.

Kevin R
Nov 22 '05 #1
2 4663
I suggest, if possible, using a Setup and Deployment project if your using VS.NET. Before installation the .msi will ensure that
the framework is installed, and is the version that your project was built against.

The installer itself places a default message telling users that they should manually insure that they have the latest service packs
installed and provides a link (if i remember correctly) to a place of download.

It doesn't seem likely that there is a version-indepent way of checking for a particular framework version/service pack comibination
since the installer doesn't even check for service packs.

At least using an installer will be a nice way of letting them know that your program requires the latest framework service pack and
that the user should ensure that their computer meets the base requirements of your software.

hope it helps

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Kevin R" <me@privacy.net> wrote in message news:k0********************************@4ax.com...
Hi All,

I need to establish that the machine on which my user intends to run
my program is at least .Net version 1.1 SP2 and am having a little
trouble figuring out how to do this.

I don't want the user to have to mess about with the Administrative
tools, or mmc.exe. I just need my program to figure out on first run
whether the environment supports a particular action.

I see that there is a property of the Environment class
called Version, which on my machine returns the numbers
1.1.4322.2032
It's not clear from this what the service pack is.

Microsoft say in KB318785 to look for a registry key

HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework
Setup\NDP\v1.1.4322

and the SP revision is given there.

This is great while .Net is still on version 1.1, but what happens
when it becomes version 1.2 ? That registry key probably won't
exist anymore. I don't want to have to distribute another version
of my program.

Is there a way I can find out whether the CLR version is
equal to or greater than Version 1.1 SP2 ?

Thanks for any suggestions.

Kevin R

Nov 22 '05 #2
That sounds sensible.
I had considered shipping my small utility program as a single
executable, which the user would then put wherever they like.
It does make more sense to use an installer I think.

Thanks,

Kevin R.

On Fri, 1 Jul 2005 19:24:42 -0400, "Dave"
<NO*********@dotcomdatasolutions.com> wrote:
I suggest, if possible, using a Setup and Deployment project if your using VS.NET. Before installation the .msi will ensure that
the framework is installed, and is the version that your project was built against.

The installer itself places a default message telling users that they should manually insure that they have the latest service packs
installed and provides a link (if i remember correctly) to a place of download.

It doesn't seem likely that there is a version-indepent way of checking for a particular framework version/service pack comibination
since the installer doesn't even check for service packs.

At least using an installer will be a nice way of letting them know that your program requires the latest framework service pack and
that the user should ensure that their computer meets the base requirements of your software.

hope it helps


Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Sherman Willden | last post by:
I am trying to use Perl's XML::Twig to modify a version number in an XML document. At the very end of this posting is an excerpt from the xml document. Just before the xml excerpt is the Perl code...
2
by: Kevin R | last post by:
Hi All, I need to establish that the machine on which my user intends to run my program is at least .Net version 1.1 SP2 and am having a little trouble figuring out how to do this. I don't...
6
by: GSpiggle | last post by:
I have a database with records that should have a consecutive number ID (Check Register). Also has other records (deposits and adjusting entries) that don't fit in the number range so...
10
by: Dixie | last post by:
I need to delete some relationships in code. How do I know what the names of those relationships are?
5
by: Charles Law | last post by:
I want to display the name and version of all assemblies (dlls?) used/required by my application in a Help | About box. Is there a way to do this? One of the problems I anticipate is that...
12
by: e271828 | last post by:
Hi, I'm helping to work a developer tool that verifies a given HTML element has a given attribute (e.g., that all LABEL elements have a FOR attribute, all INPUT elements have an ID attribute,...
7
by: gtb | last post by:
I wish to copy the highest version number of a file from directory \ \ \fileserver\D:\scripts to C:\scripts where the file names are of the form filename_MM.NN.SS.zip, where MM, NN, and SS...
10
by: strife | last post by:
Hi, This is a homework question. I will try to keep it minimal so not to have anyone do it for me. I am really just stuck on one small spot. I have to figure out the highest number from a users...
2
by: arnuld | last post by:
Again, my friend, who does not much access to internet, has given me a working program and I need your views on improvement and design. I put some error checking but my experience with C has made...
275
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.