Solved

vs 2005 deployment project and prebuildevent

Posted on 2007-03-21
2
689 Views
Last Modified: 2013-11-26
All,
I have a deployment/install project in VS 2005.
I have a pre req of .NET framework embedded into it and seems to work fine.

I need to run a little EXE program AFTER the framework is installed but BEFORE the Project is installed.
I am flirting around with the prebuildevent, but it doesnt seem to run from there.
I have tried:
Call Cmd(program.exe)
and just:
Cmd(program.exe)

I am new to deployment projects and feel this is something simple, but can someone give me the proper syntax or call for this?

Thanks!
0
Comment
Question by:Cleavis
2 Comments
 
LVL 15

Accepted Solution

by:
igor_alpha earned 500 total points
ID: 18769292
Hi, Cleavis!
For perform some operations on installing or run some executables you need to add custom actions to deployment projects.
Then you need to create installer class, which would execute your .exe and set custom action to it.
Installer class would just start your programm so it code would be simple:
            ProcessStartInfo info = new ProcessStartInfo();
            info.FileName = Path.Combine(System.Environment.GetEnvironmentVariable("somedir"),
                 "program.exe");
            info.CreateNoWindow = true;
            info.UseShellExecute = false;
            Process.Start(info);
Detailed article, described how to create custom action you can find below.
Building Custom Installer Classes in .NET
http://www.devx.com/dotnet/Article/20849/0/page/1
0
 

Author Comment

by:Cleavis
ID: 18882869
igor,

yes, this should work for me.

thanks for the info!
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question