I’ve seen the WebApplicationExtension element, but because it must be a child of WebApplication, it appears to require the creation of a new WebApplication. I don’t want that.
I want to create the extension (or script map) on an existing website. On uninstall, the website should remain but the extension (script map entry) should be removed.
Anyone know how to do this in WIX?
If I get no good answers, I guess I will have to do it within script before InstallFinalize.
I couldn’t figure out a way to do this in WIX, so I resorted to a custom action. I had been writing all my custom actions in Javascript. I find Javascript to be easy to use and robust for that purpose, despite what others have said.
But I could not find a way to add a scriptmap from Javascript, because the IIS metabase update requires the use of a VBArray datatype, which is supported in VBScript, but not in Javascript. Whoops.
So, here is the code, in VBScript.
Here’s the WIX code:
See also:
AddExtensionFile.