Your installer should check the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp

If this key exists, then IIS is installed. If it doesn't exist, IIS isn't installed. It really doesn't get any simpler than that. This key also provides some additional interesting information, such as the IIS version number. The version information is kept in the MajorVersion MinorVersion registry keys as DWORDs