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.
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
check out this post: http://community.installshield.com/s...d.php?t=136941
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
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
________________(*)/_(+)_________________________
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:
Changed 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;
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.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;
Last edited by Perucho; 11-25-2004 at 03:10 PM.