Sunday, July 15, 2007

Making Web Setup projects run on Windows Vista

Windows Vista offers many enhancements over previous operating systems. Unfortunately for us developers it also presents some challenges. One such challenge is making a Web Setup project run on Windows Vista. This post shows step-by-step how to make it work.

Windows Vista comes pre-configured with IIS 7. Unfortunately, Web Setup projects do not recognize IIS 7 and therefore will fail when you attempt to run it on Windows Vista. In my case, the failure is presented as shown in the following figure.

Doing a lot of searching in Google presented me with nothing really obvious. As you can see from the figure above, the error message is not really helpful. Luckily, while searching for something else, I stumbled onto a MSDN article titled Troubleshooting Windows Installer Deployment. In the article I found the section Web Setup deployment projects in Visual Studio 2005 on Windows Vista, as a new section for Visual Studio 2005 SP1. The section says

When you create a Web Setup deployment project in Visual Studio 2005 on Windows Vista, you need to turn on the Windows feature IIS Metabase and IIS 6 configuration compatibility, and you need to be logged on as an Administrator; otherwise you will be unable to run setup.exe to install the project.

In order to turn on the Windows feature you can follow these steps:

1. Launch Control Panel and select Programs. This will display the Programs options.

2. In the Programs options select Turn Windows features on or off. This will display the Windows Features dialog.

3. In the Windows Features dialog expand the branch as shown in the following figure to finally select IIS Metabase and IIS 6 configuration compatibility. Select OK to install the feature.

Let Windows complete the installation. Once complete you will be able to run your Web Setup project on Windows Vista.

1 comment:

Anonymous said...

Thanks, it worked a treat!