How to run the executable at the end of the installation project?

I have a Visual Studio installation project that I use to install a fairly simple WinForms application. At the end of the installation, I have a user interface page that shows one flag that asks the user if he wants to run the application. I saw other installers doing this quite often. But I can’t find a way to get the installation project to run the executable after the installation is complete. Ideas?

NOTE. You cannot use custom actions because they are used as part of the installation process, I want to launch my installed application as soon as the user clicks the Close button at the end of the installation.

+20
installation winforms
Sep 13 '08 at 14:25
source share
7 answers

I believe this is one of the real limitations of the Visual Studio installation project. You should be able to change the last page of the installation user interface, but VS.NET does not give you the opportunity to do this. You can modify tables in .MSI after it has been built, but VS.NET will probably overwrite these changes every time it is built. You can override the last page using the mail merge module that you will include in the installation project. In any case, you will need to familiarize yourself with how user interface dialogs are created in .MSI, and this is not trivial.

You might want to upgrade to a free script-based installer or buy a commercial application-building application (just don't buy InstallShield for the love of Pete). Take a look at InstallAware (although I haven't used it).

+8
Sep 13 '08 at 17:17
source share

You can also use custom actions.

+4
Dec 10 '09 at 9:32 a.m.
source share

I found a very simple way that does not require external tools. You only need to add the class file to the main project and a custom action in the installation project.

http://www.codeproject.com/KB/install/Installation.aspx

+4
Nov 24 '10 at 12:30
source share

I did this for internal applications by creating a VB Script wiring harness that launches the installation executable, waits for it to close, and then launches the second program.

You can also do this with a little more polish by using a few Win API calls in the C executable.

+1
Sep 13 '08 at 16:03
source share

You can use MSILAUNCH (although I just got it to work with MSICREATE).

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

+1
Nov 17 '08 at 2:55
source share

I did this by calling the Main method with the following line:

(typeof(ClassWithinAssemblyToExecute)).Assembly.EntryPoint.Invoke(null, new Object[] {} ) 
0
Sep 13 '11 at 4:32
source share

You can do this with a custom installer. just add the installer class and there you will see many events, like after installation, before installation. just connect after installation and from there run ur exe on the process class. I would suggest u google to learn more about the custom installer. here is one good link that can help u http://www.codeproject.com/Articles/19560/Launching-Your-Application-After-Install-using-Vis

thank

0
Jan 29 '13 at 12:34
source share



All Articles