Start program after install

jccorner

Well-known member
Joined
Jan 31, 2004
Messages
144
Can someone direct me how to stat my program immediately after install. Im using VS.Net 2005. Thank you very much.
 
Did you ever find a solution for this? I have created an installer using VS2005, but I cant seem to find a way to launch my app afterwards.

The Setup Project has something about PostBuildEvent, and I suppose this would be for launching my application. But, I cant seem to find anything on how to use it.
 
Hi,

I was also looking for a solution for some days... I developed applications which normally should start after installation.

I created a solution myself.

To run your application after installation, follow this instructions.

1. Add one Installer class in your project, say Installer1.cs ( I used c# to develop this application even though i am a vb.net developer).

2. Create event handler for AfterInstall event

3. Inside AfterInstallEvent add these code fragment..

C#

Process p = new Process();
InstallContext cont = this.Context;

ProcessStartInfo inf = new ProcessStartInfo(cont.Parameters["assemblypath"]);
p.StartInfo = inf;
p.Start();

VB.NET

Dim p as Process = new Process()
Dim cont as InstallContext = me.Context;

Dim inf as New ProcessStartInfo(cont.Parameters("assemblypath"))
p.StartInfo = inf
p.Start()



4. Then select your setup project in your solution explorer. Select "Custom Action Editor"

5. Add custom action under Install. Browse your executable file and rebuild the project.

6. After the installation process get completed, installer will run the primary executable.

Cheers...
:)

Ajeesh B Nair
 
Ajeesh,

After reading your post, I started Googling and looking through the MSDN help. There is a lot of information on how to set different aspects of this Installer class, but nothing seems to say, "Here is where to start if you want to use the Installer class."

Since Ive never heard of this Installer class, I think I will post a new thread asking about it.
 
This goes to all who have either a program or have started these part time schools. I think in the future I may try to start one.

Pete
 
Back
Top