Jump to content
Xtreme .Net Talk

Recommended Posts

  • 1 year later...
Posted

Did you ever find a solution for this? I have created an installer using VS2005, but I can't 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 can't seem to find anything on how to use it.

  • 1 month later...
Posted

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

Posted

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 I've never heard of this Installer class, I think I will post a new thread asking about it.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...