|
-
Apr 1st, 2008, 08:39 AM
#1
Thread Starter
Addicted Member
[RESOLVED] .Net 2 Installed
I currently have an application written in 2003 running .Net 1.1.
Whenever I issue a new release I load a new EXE onto a FTP server and the clients automatically updates when they next launch the application.
In the near futture I want to convert the app to 2008 and .Net 2. So what I thought was that the next time I issue a new version I could put a check in to see if the client has .Net 2 already installed, and if not launch the dotnetrfx2.exe in preperation.
Does anybody have any sample code that checks for the versions of .Net installed on a client? I've searched through the posts but can't seem to find a difinative answer.
Thanks
Beware of programmers who carry screwdrivers.
-
Apr 1st, 2008, 08:47 AM
#2
Fanatic Member
Re: .Net 2 Installed
What deployment mechanism are you using? ClickOnce gives you the option to select which .Net Frameworks are pre-requisites. That would take care of the whole thing for you.
My.Settings.Signature = String.Empty
-
Apr 1st, 2008, 08:49 AM
#3
Re: .Net 2 Installed
You could to check during the package developement wizard.
See the "To set optional properties for the deployment project" title in this Link
http://msdn2.microsoft.com/en-us/lib...6a(VS.80).aspx
-
Apr 1st, 2008, 08:53 AM
#4
Re: .Net 2 Installed
Or You could to retrive the key name in the registry in this path
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework
and check for the particular version is avalible and check vice versa
-
Apr 1st, 2008, 09:37 AM
#5
Re: .Net 2 Installed
So from a clients machine you are simply downloading an exe and replacing there existing version. Why not put some code into your exe to check the above reg key to see if the framework exists. If not then either fire a download or shell the .Net install file from a network drive.
I suppose that depends if your users have rights to install on the machines.
-
Apr 1st, 2008, 02:47 PM
#6
Thread Starter
Addicted Member
Re: .Net 2 Installed
I've ended up checking the registry to see if the following key exists
software\microsoft\net framework\ndp\v2.0.50727
If it doesn't it then runs an install of dotnetfx.exe and terminates the program. I was really wondering if there was a class in .Net to see what versions were installed, but the above works fine.
Thanks
Beware of programmers who carry screwdrivers.
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
|