views:

565

answers:

3

Hi,

How can I add new application mapping in IIS using vbscript?

Thanks,

A: 

Use a combination of ADSI with VBScript. There are several examples here: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/library/IIS/4b976f46-3751-4f6b-ab68-5e19fa73a7b1.mspx

Haacked
+2  A: 

Basically you could use adsutil.vbs to manipulate the ScriptMaps within the MetaBase.

Unfortunately, adsutil.vbs is unable to set single items in LIST properties like ScriptMaps. You can only set or delete the list as a whole. Any additional processing would require your own coding.

A person named David Wang has made a VB script that has this capability. He explained in more detail in his blog entry on the topic. The script he made can be copied from there. You can modify other LIST properties with it as well.

Tomalak
A: 

Hi Tomalak,

Thanks for the link, I did use his posted code with some modifications to fit my needs. And it worked great.