checking for .net framework 3.5

Discussion in 'General Computer Support' started by lttan123, Oct 22, 2008.

  1. lttan123

    lttan123

    Joined:
    Oct 22, 2008
    Messages:
    2
    How to detect whether the machine have .Net Framework 3.5 install from .net 2.0
     
    lttan123, Oct 22, 2008
    #1
    1. Advertising

  2. lttan123

    lttan123

    Joined:
    Oct 22, 2008
    Messages:
    2
    I mean doing it programatically from vb.net for instance
     
    lttan123, Oct 22, 2008
    #2
    1. Advertising

  3. lttan123

    krayknot

    Joined:
    Apr 23, 2008
    Messages:
    5
    string key1 = "";
    string key2 = "";
    string key3 = "";

    bool v10 = false;
    bool v11 = false;
    bool v20 = false;

    key1 = Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey(".NETFramework").OpenSubKey("Policy").OpenSubKey("v1.0").GetValue("3705").ToString();
    key2 = Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey(".NETFramework").OpenSubKey("Policy").OpenSubKey("v1.1").GetValue("4322").ToString();
    key3 = Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey(".NETFramework").OpenSubKey("Policy").OpenSubKey("v2.0").GetValue("50727").ToString();

    v10 = (key1 == "3321-3705");
    v11 = (key2 == "3706-4322");
    v20 = (key3 == "50727-50727");

    MessageBox.Show(".Net Framework v1.0 - " + v10.ToString() + Environment.NewLine +
    ".Net Framework v1.1 - " + v11.ToString() + Environment.NewLine +
    ".Net Framework v2.0 - " + v20.ToString());

    kshitij kumar
    Senior Software Engineer
    Pune

    krayknot@yahoo.com
     
    krayknot, Oct 23, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. I-ball
    Replies:
    2
    Views:
    1,836
    I-ball
    Dec 8, 2005
  2. Robert11
    Replies:
    2
    Views:
    486
  3. John Yung
    Replies:
    6
    Views:
    1,561
    John Yung
    Dec 30, 2005
  4. Giuen
    Replies:
    0
    Views:
    1,160
    Giuen
    Sep 12, 2008
  5. Ozark

    Installing Paint.net / .NET Framework 3.5

    Ozark, Dec 6, 2009, in forum: Computer Support
    Replies:
    2
    Views:
    1,381
    Ozark
    Dec 9, 2009
Loading...

Share This Page