cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Mark_Koehler
Level 6

IIS7 Compatibility

From judicious research and experimentation, I've found that my InstallScript MSI project requires the 'IIS Metabase and IIS 6 Configuration Compatibility' feature in order to successfully install under Vista or Server 2008.

Other users have encountered a similar issuehttp://community.installshield.com/showthread.php?t=170850" target='_blank'>issue

While I'm less than thrilled that this issue appears unresolved with the latest and greatest InstallShield, my bigger problem is trying to detect whether or not the feature is installed so I can alert the user. InstallShield support recommended the following approach

HRESULT hr = CoGetClassObject(GETAdminBaseCLSID(TRUE), CLSCTX_SERVER, NULL, IID_IClassFactory, (void**) &pcfFactory);

if (hr == S_OK) the feature is installed.

Has anyone actually tried this in practice? In my experiments with Vista, this call was successful regardless of whether or not the feature was installed. Anyone have another approach? Any idea how much longer until InstallShield can add web service extensions without relying an out of date approach (IIS 6 metabase / ADSI)?
Labels (1)
0 Kudos
(2) Replies
Not applicable

Per the documentation on CoGetClassObject ( http://msdn2.microsoft.com/en-us/library/ms684007(VS.85).aspx ) I would assume that if it returns S_OK then the object should be registered. Can you access any methods of the created object's type?

It doesn't make sense to be able to successfully instantiate a Com Interface to a class object that doesn't exist.

Perhaps someone else has some thoughts on this?
0 Kudos
Mark_Koehler
Level 6

I found it a bit odd myself. Perhaps this object doesn't have any connection to the 'IIS Metabase and IIS 6 Configuration Compatibility' feature.

As for your question, I did try creating an object and was able to use it with success even though the feature wasn't installed. So, I'm back at square one.

I tried another approach that had better results:

hResult = ADsGetObject(L"IIS://localhost/w3svc",IID_IADsContainer, (void**)&iContainer);

This fails when 'IIS Metabase and IIS 6 Configuration Compatibility' is not available but succeeds when it is available. This code is similar to the code found in a lot of IIS 6 configuration scripts.

I'm still looking for some more insight as to why InstallShield's suggested method does not work. Perhaps installing the 'IIS Metabase and IIS 6 Configuration Compatibility' feature adds the IMSAdminBase class but installing the feature doesn't remove it.
0 Kudos