As I prepare to release version 1.0 of Mister Lister, I have discovered yet another limitation of the setup projects you can generate within Visual Studio .NET. I'll admit, however, that this particular limitation may be related to the MSI format itself.
I am creating a standard setup project (for a WinForm application). However, since I know Mister Lister will require IIS, I am also adding IIS as a launch condition within the setup. This should prevent anyone from installing Mister Lister unless IIS is on the machine. By default, a launch condition is already established for the .NET Framework.
I would prefer that my setup check for IIS BEFORE it checks for the .NET Framework. That way, IIS will be installed BEFORE the .NET Framework is installed, which will (hopefully) limit support issues related to .NET not being registered with IIS properly.
However, the .NET Framework condition seems to always be checked FIRST. At first, I thought this might be related to the order they are displayed within the Launch Condition view within VS.NET. So, I tried renaming my condition so that the .NET condition would show up after the IIS condition. However, this did not solve the problem.
I did discover a message via a google search that identifies the problem. If the InstallURL property is empty, the condition will be checked AFTER all the conditions where the InstallURL is not empty. I thought perhaps I could use Orca to manually change the order. However, I have discovered something. If the InstallURL property is not blank, the launch condition shows up in the VsdLaunchCondition table. However, if the InstallURL property is blank, then the condition ends up in the LaunchCondition table. Editing the VsdLaunchCondition table will not help, because the Url value in that table cannot be NULL anyway (which is probably why it gets moved by VS.NET).
So, anyway - what can you do? Well, one possibility is to add a URL that points to the Microsoft site with information about IIS (something like: http://www.microsoft.com/iis/). Keep in mind that you'll want to adjust your message so that it tells the user what to do. For these launch conditions that have a URL, the dialog box is a Yes/No box, with the Yes prompt loading the URL. So, your message could add something like: "Click Yes to read more about IIS on Microsoft's website."
This was the approach I was going to use at first, but I have come up with something that I think is better. Instead, I have changed the InstallURL property to read: "control.exe". This loads the control panel when the user clicks on "Yes", which is closer to what they want, since they will need to use Add/Remove Programs to install IIS. (Anyone know how to directly load Add/Remove Programs? If so, I'll switch to that!)