Results 1 to 8 of 8

Thread: [02/03] Handling users who don't have .NET Framework

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    21

    [02/03] Handling users who don't have .NET Framework

    Hey. Is there a way to show a msgbox to the user (who doesn't have .net framework) with something like "You need .NET Framework 1.1 in order to run this application."?

    Any help is OK

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [02/03] Handling users who don't have .NET Framework

    .Net framework is automatically installed on the users computer when he/she installs your application..
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3
    Addicted Member
    Join Date
    Mar 2006
    Location
    Manchester, England, UK
    Posts
    247

    Re: [02/03] Handling users who don't have .NET Framework

    An install package that doesn't include the .net framwork will check that the user has the correct version installed and if not allow them to download from Microsoft.

    you can of course add it to your setup package but this adds about 20Mb to the package size.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    21

    Re: [02/03] Handling users who don't have .NET Framework

    Yea I know, but what if I don't want to make an installation package (just open the EXE and use it)?

  5. #5
    Addicted Member
    Join Date
    Mar 2006
    Location
    Manchester, England, UK
    Posts
    247

    Re: [02/03] Handling users who don't have .NET Framework

    I'm not sure how you could do this unless you write another exe to check then launch the .net application. I guess a registry lookup would do the job.

    Bare in mind you can't check if the .net framework exists with a .net appl because it won't run unless it is installed.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    21

    Re: [02/03] Handling users who don't have .NET Framework

    Quote Originally Posted by DanInManchester
    I'm not sure how you could do this unless you write another exe to check then launch the .net application. I guess a registry lookup would do the job.
    Yep, I've already thought about that. That's why I created this topic.

    However, can you tell me more details around how to check if he has .NET installed? Maybe reading the folder: %SystemRoot%\Microsoft.NET\Framework

    In the registry, I don't know where to look at.

  7. #7
    Addicted Member
    Join Date
    Mar 2006
    Location
    Manchester, England, UK
    Posts
    247

    Re: [02/03] Handling users who don't have .NET Framework

    I've never really gone into it but I guess you could check for the existance of the installation folder or use the registry keys at

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework
    Setup\NDP\

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] Handling users who don't have .NET Framework

    A .NET application cannot do anything without the .NET Framework, including check whether the .NET Framework is installed. .NET applications get compiled just-in-time by the Framework. If the Framework is not installed then there is no JIT compilation so there is no execution. It's like asking a dead person to check if they're dead. The only way to check for the presence of the .NET Framework is with a compiled, native application.

    Create an installer or TELL your users they need the Framework. If you're users aren't smart enough to work it out then that's why you should be creating an installer.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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