Solved

vs 2005 deployment project and prebuildevent

Posted on 2007-03-21
2
676 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now