+ Reply to Thread
Results 1 to 5 of 5

Thread: How to get .NET Version and service pack version

  1. #1
    Manish Jhalani Guest

    Default How to get .NET Version and service pack version

    I want to know the .NET version. I am trying this to check for .NET 3.5 but not getting any success. I am not getting message box.

    SET Variable %DOTNET_FRAMEWORK% to Function:Get System Info(.NET Status) for "$NET_FRAMEWORK_35$"
    If %DOTNET_FRAMEWORK% Equals "1" Then
    Else
    Display Message Box "Please install .NET 3.5" -- "My Soft"
    End


    Also I want to get if the .NET SP1 is installed ? Please provide script code to check if .NET SP1 is installed or not.

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to get .NET Version and service pack version

    Hello,

    This function returns additional values in %_SB_RETURN% and %_SB_RETURNEX%:

    If the function succeeds (specific framework installed), %_SB_RETURN% contains the version number of the installed framework (if available).

    If the function succeeds (specific framework installed), %_SB_RETURNEX% contains the service pack number of the installed framework (if available).

    Does this help?

    Friedrich

  3. #3
    Unregistered Guest

    Default Re: How to get .NET Version and service pack version

    Quote Originally Posted by linder View Post
    Hello,

    This function returns additional values in %_SB_RETURN% and %_SB_RETURNEX%:

    If the function succeeds (specific framework installed), %_SB_RETURN% contains the version number of the installed framework (if available).

    If the function succeeds (specific framework installed), %_SB_RETURNEX% contains the service pack number of the installed framework (if available).

    Does this help?

    Friedrich

    Thanks. But why the code is not working for me. I am using standard functions and help from setup builder.

    SET Variable %DOTNET_FRAMEWORK% to Function:Get System Info(.NET Status) for "$NET_FRAMEWORK_35$"
    If %DOTNET_FRAMEWORK% Equals "1" Then
    Else
    Display Message Box "Please install .NET 3.5" -- "My Soft"
    End


    Second I also got the lines you mentioned in the help. But in which form I would get the information in %_SB_RETURN% and %_SB_RETURNEX%. Is it any number/string. Any specific form of result ?

    Whay %_SB_RETURN% and %_SB_RETURNEX% would have in case of .NET 3.5 and SP1 ?

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to get .NET Version and service pack version

    Hello,

    See attached screenshots. If .NET 3.5 is available, the source code snippet will display the exact version and service pack. In this case it's .NET 3.5 SP1 on a Windows 7 x64 machine.

    Does this help?

    Friedrich
    Attached Images Attached Images   

  5. #5
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to get .NET Version and service pack version

    BTW, the following in your code snippet looks strange:

    SET Variable %DOTNET_FRAMEWORK% to Function:Get System Info(.NET Status) for "$NET_FRAMEWORK_35$"

    You have to use the "Get System Info..." script function and not a "Set Variable..." function. See attached screenshot.

    Friedrich
    Attached Images Attached Images  

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •