Creating IIS Websites and Virtual Folders

Got a problem you cannot solve? Try here.
Post Reply
Bikedude
Posts: 24
Joined: Wed Jun 10, 2009 10:02 am

Creating IIS Websites and Virtual Folders

Post by Bikedude »

Has anyone tried uninstalling this sample?

I (stupidly?) changed this sample to only require IIS 5.1 (rather than 6.0), installed the project (successfully!) and then wanted to uninstall it.

It asked me if I wanted to remove the sites and virtual folders created by the setup. One "Yes" later and my entire default web site disappeared into thin air... (It nuked everything rather than only touching the virtual folder it added)

As designed?
neillans
Posts: 536
Joined: Sat Nov 04, 2006 6:21 am
Location: Scottish Borders, UK

Post by neillans »

Not quite by design I think, but more a consequence of passing a blank variable to the remove API! If you step through your script, you will note that the website variable is not actually set ...
Andy Neillans
Bikedude
Posts: 24
Joined: Wed Jun 10, 2009 10:02 am

Post by Bikedude »

But isn't there another potential flaw here?

Using a standard template, let us say I tell the script to create the "Rune rules" website.

Let us further assume this website already exist for some reason (my colleague is also named "Rune" and he too thinks he rules).

AFAICT, the uninstall part of the script will always (default settings) attempt to remove this website, regardless of whether the installer had to create a new website or not?

It also looked a bit strange that the uninstall code first attempts to remove the site, before it makes an attempt at removing the virtual folder. I guess this is as designed, since it first checks if it really managed to delete the site...
Post Reply