views:

177

answers:

1

Currently I am able to to set a mime type with adsutil.vbs for the primary web site on IIS6 with the following syntax:

cscript adsutil.vbs set W3SVC/1/Root/MimeMap ".manifest, text/cache-manifest"

This seems to work fine when I only need to target W3SVC/1.

I need to write an update script that will make sure that any sites on a given IIS6 installation have the proper mime type configured. I could either add the mime type to each individial site or at the global level. I need to do this programmatically and would like to use adsutil.vbs if at all possible.

A: 

I think the easier way will be to just amend the mime types on each server, you need only do it once for the change to cascade down to each website, why are you trying to rewrite the .vbs mime type though? you might be better off creating a custom one.

Or you could set the change in the Metabase for IIS, you just need to set the enable direct metabase edit to true on each server then make the changes though code.

TheAlbear