Results 1 to 5 of 5

Thread: Check for the version of IIS installed.

  1. #1
    Join Date
    Mar 2002
    Location
    Rockland, ME
    Posts
    33

    Check for the version of IIS installed.

    Hi.

    I need to be able to check that IIS is installed on the target PC. I also need to be able to check the version of IIS installed. The version must be 5.0 or better. How can I do this with Installscript.
    Ryan Taylor
    rtaylor@stgeorgeconsulting.com

  2. #2
    Join Date
    Jul 2004
    Location
    USA
    Posts
    385

    Wink IIS version installed


  3. #3
    Join Date
    Mar 2002
    Location
    Rockland, ME
    Posts
    33
    Hi.

    I saw that posting, but there was not much information in the post. I couldn't find information on any of those keywords in the help. From a newsgroup posting on Microsofts forum I have a few registry keys I can check. They are:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\MajorVersion
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\MinorVersion
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\VersionString

    You can also read the version of inetinfo.exe in C:\WINDOWS\system32\inetsrv

    The IIS version is also specific for each OS, so you cannot for example have
    IIS 6.0 on Windows XP, Windows XP can only have IIS 5.1. (There is a KB
    Article with this list, but i cannot find it for the moment)
    Ryan Taylor
    rtaylor@stgeorgeconsulting.com

  4. #4
    Join Date
    Dec 2001
    Location
    La Crosse, WI, USA
    Posts
    112

    Finding IIS Version

    Here's what I've been doing. Seems to work. YMMV:

    RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE );
    RegDBGetKeyValueEx ( "SYSTEM\\CurrentControlSet\\Services\\W3SVC\\Parameters" , "MajorVersion" , nErr , svValue , nvSize );
    if (svValue < "5") then
    //if we get to this point, we don't have IIS 5 or better installed.
    endif;
    ---------------------------------------------------------------
    Andy Marchant-Shapiro amarchantsha@businessobjects.com
    Programmer/Analyst __o 608.782.5000.x2585
    Business Objects _-\<,_ La Crosse, WI
    ________________(*)/_(+)_________________________

  5. #5
    Join Date
    Jul 2004
    Location
    USA
    Posts
    385

    Wink OnIISCheckRequirements()

    InstallShield X checks for the IIS version if you use the IIS IDE and create a Website and/or Virtual Directory. By using the IIS IDE and creating a virtual directory, it triggers the detection of IIS on the target machine. The function event OnIISCheckRequirements() is called.

    Take a look at the code of the function event OnIISCheckRequirements(), and you can change it to check for version 5.0 and above, instead of 4.0 and above.

    It supports IIS 4.0 or above
    IIS_VERSION_MAJOR_MIN_SUPPORT is 4.

    function OnIISCheckRequirements()

    Original code:
    Code:
    // if the version is not adequate, display messagebox and abort
    if ( IISRTGetIISVersion( IIS_GET_VERSION_MAJOR ) < IIS_VERSION_MAJOR_MIN_SUPPORT ) then
    szMsg = SdLoadString( IDS_IFX_IIS_INADEQUATE_VERSION );
    MessageBox(szMsg, SEVERE);
    abort;
    endif;
    Changed code:
    Code:
    // if the version is not adequate, display messagebox and abort
    if ( IISRTGetIISVersion( IIS_GET_VERSION_MAJOR ) < 5 ) then
    szMsg = SdLoadString( IDS_IFX_IIS_INADEQUATE_VERSION );
    MessageBox(szMsg, SEVERE);
    abort;
    endif;
    InstallShield supports version 4 and later of IIS. It does not support the version of IIS that is installed with the NT Option Pack on NT Workstation—only the version that is installed to the NT server.
    Last edited by Perucho; 11-25-2004 at 04:10 PM.

Posting Permissions

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