title: How to add New Application mapping in IIS6 and IIS 7 programmatically using WMI and C#?
body: <p>My goal is to add php Extension to IIS6 and IIS 7 via Code in C# using WMi (System.Management). I cant use DirectoryEntry.  </p>
  
  <p>I am stuck with adding a new ScriptMap Object to IIS 6/IIS7. </p>
  
  <p>I have read some posts at here and there and heard that adding new WMi object from Scratch is difficult.</p>
  
  <p>I want to enable IIS 6/IIS7 to handle php as well as aspx files and be able to process them. I have extracted php zip archive to a directory on my system (not installed it). The propblem is i am able to modify existing ScriptMap objects but i dont get to understand the add a new ScriptMap Objects.</p>
  
  <p>Also i am not sure whether adding the a new extensiuon handler to ScriptMap will solve the problem or not.</p>
  
  <p>Please guide.</p>
  
  <p>Thanks</p>