Results 1 to 6 of 6

Thread: [RESOLVED] .Net 2 Installed

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Location
    Chesterfield, UK
    Posts
    162

    Resolved [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.

  2. #2
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    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

  3. #3
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    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

  4. #4
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    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

  5. #5
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    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.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Location
    Chesterfield, UK
    Posts
    162

    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
  •  



Click Here to Expand Forum to Full Width