PDA

View Full Version : Get System Info - IIS Version



Jonathan Kay
05-26-2010, 10:07 AM
Hi,

I'm using the SetupBuilder 'Get System Info' function to return the installed 'IIS Version'. It works fine under Windows 7 (returning version 7.5.x.y as expected). However it appears to fail on Vista (I have IIS version 7.0 installed and running). I haven't tried other Operating Systems but I need to incorporate this check for an ISAPI extension.

Please could you see if you can reproduce?

Thanks,
Jon.

linder
05-26-2010, 10:20 AM
Jonathan,

The IIS check is done by looking for inetinfo.exe in %SYS32DIR%\inetsrv. Then it reads the file version info from the version resource.

What you can do is to check the "HKLM\Software\Microsoft\InetStp\MajorVersion". If the DWORD value is 7 then IIS 7 is installed.

Friedrich

linder
05-26-2010, 10:48 AM
BTW, another thing worth checking for is whether this Vista machine is 64-bit and inetinfo.exe is installed in the "real" 64-bit SYSTEM32 folder. In this case, try to switch the installer into 64-bit mode before you do the "Get System Info" check to access the 64-bit SYSTEM32 folder. Don't foget to switch it back to 32-bit processing mode after that.

Friedrich

Jonathan Kay
05-27-2010, 02:51 AM
It's 32-bit. Apparently inetinfo.exe is only present when IIS 6 Metabase Compatability is switched on (which it is on my Win7 box, and it's off on my Vista machine - hence the reason it didn't work under Vista).

Since the default is to have compatability off this makes me think it might be best for SB itself to use the registry - there doesn't seem to be a better way. What do you think?

Jon.

linder
05-27-2010, 03:08 AM
I agree. Today, the best way to determine if a specific version of Internet Information Services is installed is to look in the registry.

But the "Get System Info" function in SB is there for quite a few years. We have to check if such a change can cause backward compatibility issues.

Friedrich

linder
05-27-2010, 03:40 AM
Additional logic added to handle this scenario.

Friedrich

Jonathan Kay
05-27-2010, 03:43 AM
Great thanks.

linder
05-27-2010, 03:49 AM
Jonathan,

The following demo installer has been compiled with the new internal SB72 build:

http://www.lindersoft.com/projects/iis_demo.zip

Does it detect your IIS7?

Thanks,
Friedrich

Jonathan Kay
05-27-2010, 05:02 AM
Yes, but only the major version. However, that's fine for my purposes.

Jonathan Kay
05-27-2010, 05:03 AM
Actually, it should report at least major.minor number.

Jon.

linder
05-27-2010, 05:29 AM
No problem. It returns both major and minor version numbers now (e.g. 7.5 for IIS on Windows Server 2008 R2).

Friedrich