views:

733

answers:

3

Right now, I am creating an msi and a setup.exe using the Visual Studio. It works quite well... till recently.
I recently added a new dialog box with a Combo Box Control to the msi. Now when I install the app directly using the msi, everything is works just fine.
But when I run the Setup.exe, the ComboBox is not displayed correctly. It only displays one element at a time in the drop down list. All the elements are still there, and I can even select them using the Up/Down keys or the letters ('S' for SQL Server, for instance).

Has anyone seen this kind of a problem before? Moreover, when I use InstallShield to create the setup, the exe created by InstallShield again runs fine.

So I suppose I need to fix the one with Visual Studio. Any ideas how to do fix the visual studio bootstrapper?

Platform:

Using Visual Studio 2005 for the builds.

OS: Windows XP SP3.

The build machine has Windows Installer 4.5 installed, but its not a pre-req. The msi itself runs fine with Windows Installer 3.

Also, the problem is not that the setup exits too fast, or that it doesnt install properly... It does. The only issue is that the Combo Box is not displayed properly and that might confuse some users.

A: 

What version of Visual Studio are you working with? Are you using VS2008 SP1?

There is a known issue with the bootstrapper from this version of Visual Studio being introduced in SP1. Maybe you are facing the same problem? You can check the details on this issue on Microsoft's connect site:

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=369138

There is also a discussion going on here: http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/3731985c-d9cc-4403-ab7d-992a0971f686/

EDIT: Actually the thing that was fixed in SP1 could also solve your problem. The difference in SP1 is the way that the bootstrapper launches the actual MSI installer. Prior to SP1 the MSI installation (i.e. msiexec) was started as a child process of the bootstrapper (i.e. setup.exe). Now it is started as a non-child process and setup.exe returns as soon as the bootstrapping process is finished and the MSI is launched. You can see the difference also because before the buttons in the setup wizard were not using the Windows XP / Vista theme style.

0xA3
A: 

In the .MSI itself what is the height setting of the combo box control? The height property controls the combined height of the selection area and the drop area. If it is set too low then you'd get the problem behavior you're describing (though that would not explain why sometimes it appears correct).

I checked that the first thing. The height is set to a proper size. Also the msi itself _always_ displays it correctly, so does the .exe generated by InstallShield. Only the VS exe is borked.
Mostlyharmless
+1  A: 

I was unable to exactly find out WHY the VS bootstrapper was behaving the way it was, but grabbing another Setup.exe from another project (not built using VS) fixed the problem.

[I was under the impression that the Setup.exe has some kind of identifying information or a link to the MSI that it is supposed to kick off. Apparently not. Just throwing in the other setup.exe did the trick.]

Hope this helps someone.

Mostlyharmless