Adding application launch option to installations

On the whole I really like the setup functionality which comes as with Visual studio. It’s simple and as a consequence is great for creating simple installers. Unfortunately with simplicity comes compromise and often leaves you wanting more. Fortunately thanks to custom classes and marcos you can make Visual studio do most things and their only a google away.

If you want to give users the option of launching the application which was just installed (or configuration dialog / read me) at the end of the installation I suggest use this script by Aaron Stebner.

Original post,

1.    Download the sample script and extract the contents to the directory that contains the Visual Studio project you are working on
2.    Open the file EnableLaunchApplication.js in a text editor such as notepad, locate the variable at the top of the file that is set to the value WindowsApplication1.exe, and change it to the name of the EXE that is in your setup that you want to launch when the MSI is done installing
3.    Open the project in Visual Studio
4.    Press F4 to display the Properties window
5.    Click on the name of your setup/deployment project in the Solution Explorer
6.    Click on the PostBuildEvent item in the Properties window to cause a button labeled “…” to appear
7.    Click on the “…” button to display the Post-build Event Command Line dialog
8.    Add the following command line in the Post-build event command line text box:
cscript.exe “$(ProjectDir)EnableLaunchApplication.js” “$(BuiltOuputPath)”
9.    Build your project in Visual Studio

All credit to Aaron, great work.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: