Skip to content

Commit

Permalink
fix #144: uninstalling iisnode for iis express after iisexpress unins…
Browse files Browse the repository at this point in the history
…tallation
  • Loading branch information
tjanczuk committed Feb 29, 2012
1 parent a595db4 commit da9469c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/setup/iisnode-express-msi/removeiisnodesection.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
// %userprofile%\documents\iisexpress\config\applicationHost.config (IIS Express)

function main() {
var versionMgr = new ActiveXObject("Microsoft.IIS.VersionManager");
var iisex = versionMgr.GetVersionObject("7.5", 2);
var ahwrite = iisex.CreateObjectFromProgId("Microsoft.ApplicationHost.WritableAdminManager");
var configManager = ahwrite.ConfigManager;
var appHostConfig = configManager.GetConfigFile("MACHINE/WEBROOT/APPHOST");
var systemWebServer = appHostConfig.RootSectionGroup.Item("system.webServer");
try {
var versionMgr = new ActiveXObject("Microsoft.IIS.VersionManager");
var iisex = versionMgr.GetVersionObject("7.5", 2);
var ahwrite = iisex.CreateObjectFromProgId("Microsoft.ApplicationHost.WritableAdminManager");
var configManager = ahwrite.ConfigManager;
var appHostConfig = configManager.GetConfigFile("MACHINE/WEBROOT/APPHOST");
var systemWebServer = appHostConfig.RootSectionGroup.Item("system.webServer");
systemWebServer.Sections.DeleteSection("iisnode");
ahwrite.CommitChanges();
}
catch (e) {
// nothing to remove
// nothing to remove or IIS Express had been uninstalled before iisnode
}
ahwrite.CommitChanges();
}

0 comments on commit da9469c

Please sign in to comment.