What you're trying to do is considered a very bad taste in the world of software installation. The installation program must never mess up the target system. Most likely there's some website up and running, which will become unresponsive after your installation program completes.
You should always assume that before your installation program starts, the target system is in some known stable state. Disregarding of how your install ends up, you should leave the system in stable known state. This is why there's a concept of rollback actions, which are responsible for rolling the actions back in case we need to roll back the entire installation transaction.
I would recommend you to revise your installation program regarding that IIS behavior. For instance, always create a new IIS website, with the unique name. You can even create a separate application pool for it to make it truly isolated. It will be much easier to uninstall the software then - you just let the Windows Installer to do its job uninstalling what it has installed.