tags:

views:

2817

answers:

4

I have a Visual Studio Setup Project that I use to install a fairly simple WinForms application. At the end of the install I have a custom user interface page that shows a single check box which asks the user if they want to run the application. I've seen other installers do this quite often. But I cannot find a way to get the Setup Project to run an executable after the install finishes. An ideas?

NOTE: You cannot use Custom Actions because these are used as part of the install process, I want to run my installed application once the user presses the 'Close' button at the end of the install.

+1  A: 

I've done this for internal apps by creating a VB Script harness that launches the setup executable, waits for it to close, and then launches the second program.

You could also accomplish this with a little more polish using a few Win API calls in a C executable.

Nick
+5  A: 

I believe this is one of the real limitations of the Visual Studio installation project. You need to be able to modify the last page of the installation UI but VS.NET does not give you a way to do this. You could modify the tables in the .MSI after it has been built but VS.NET would probably overwrite these changes each time it is built. You may be able to override the last page using a merge module that you include in the installation project. Either way you will need to become familiar with how the UI dialogs are authored in an .MSI and this is not trivial.

You may want to consider switching to a free script based installer or buy a commercial setup authoring application (just don't buy InstallShield for the love of Pete). Take a look at InstallAware (although I have not used it).

jmatthias
+1  A: 

You can use MSILAUNCH (though I've only got it to work with MSICREATE).

http://www.cornerhouse.ca/en/msi.html

Jonathan Parker
+1  A: 

You also can use custom actions

Sly