Results 1 to 10 of 10

Thread: Testing for .net framework installed

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2002
    Posts
    56

    Testing for .net framework installed

    I need help writing a program that determines whether or not the .net framework is installed on a particular computer (the program is running on this computer, of course).

    If it detects the presence of the .net framework, it runs one program (the installation wizard). If it doens't detect the .net framework, it starts another program (the installation program for the framework) after displaying a short message telling the user what it is doing.

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    Check to see if

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework

    is in the registry.

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2002
    Posts
    56
    Thanks!

    Unfortunately, I am not skilled enough in a non-visual basic language to do anything with the registry. Could someone help with that?

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Its irrelevant to .NET. You need to ask in the C++ forum.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    You don't have to write any program to check that , VS.NET Setup and Deployment Project can do it for you . VS.NET includes a launch condition in both Windows and Web setup projects to check for the .NET Framework's presence on the target OS. If it doesn't find the .NET runtime environment, it displays a dialog box prompting the user to execute the .NET Framework redistributable file you should include with your setup.

  6. #6
    Member EagleEye's Avatar
    Join Date
    May 2002
    Location
    South Carolina, USA
    Posts
    43
    Why build it when it's already been built? So, OK, pride may make you want to figure it out. But, in case you don't, here is something Microsoft built to do just what you wanted.

    Microsoft .NET Framework Setup.exe Bootstrapper Sample

    And FYI, I do believe that you can check the registry in VB.NET. I haven't actually tried it but I do know I read about it in one of my books.

    Hope this helps.
    Eagle Eye

    "Programming is easy ... when you are done."

  7. #7
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026

    Re: Testing for .net framework installed

    Erm... A little of topic and probably a little late, but...

    Why would it matter in this case if you can look in the registry in .Net? (Yes, you can by the way.)

    If you don't have the .Net Framework installed... How can you possibly run the program to see if is installed...

    Easiest way to use .Net to check for the framework... Attempt to run the program... if you can't run it, then you don't have it installed. Just a little logic, but probably false knowing my luck.

    Squirrelly1
    Now happily married and still crankin' away at the keyboard. Life is grand for a coder, no?

  8. #8
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    Re: Testing for .net framework installed

    aren't u 2.5 years late for this

  9. #9
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026

    Re: Testing for .net framework installed

    Like I said...

    Erm... A little of topic and probably a little late, but...

    I hadn't looked at the dates until after I posted... *Ooops*

    But I'm still faced with this deployment **** as far as .Net and MDAC go, so between getting up to make coffee and thumbing through old threads, MY DAY IS PACKED!


    Later,

    Squirrelly1
    Now happily married and still crankin' away at the keyboard. Life is grand for a coder, no?

  10. #10
    Member EagleEye's Avatar
    Join Date
    May 2002
    Location
    South Carolina, USA
    Posts
    43

    Re: Testing for .net framework installed

    True ... but that was in the morning b4 work and caffeine. Not to mention that it was over 2 years ago :-)
    Eagle Eye

    "Programming is easy ... when you are done."

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