execute command after build

In Visual C++ 4.2, is there any way to automatically execute a command (exe) after a successful build?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I don't have the version 4.2. Since you are asking this question, it seems different from the version 5.0. But you should be able to do it by editting the .mak directly.
fasterAuthor Commented:
Is there ant way provided by the IDE itself?  I don't like modify the make file manually,
Create a new project in your workspace.  Make it a "makefile".  Make it a default project.  Chose any command you wish as the build procedure.  Make your original project a subproject of the new one.

Now, whenever you build the new project, the subproject will be buit first.

Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

fasterAuthor Commented:
Sorry, I want a seamless solution by the IDE, if the IDE itself can't do this cleanly, I'd rather not have it.

So it seems that there is no such feature in VC.
If you want the IDE of 4.2 to automatically and transparently execute a command after any successful build then no, you cannot do it.

You do however have several workarounds:
1. chensu's suggestion of editing the .MAK files.
2. My suggestion of using subprojects.
3. Create a "tool" that will invoke the makefile and your command.

There is a simple solution - I have tested it and it works:
Menu Build -> Settings  
custom build
 Build commands:
Output File
my application runs now automatically after build
Hope that helps


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fasterAuthor Commented:
Thanks Norbert.  How come I did not the "custom build" tab.
So, that is the same as Visual C++ 5.0.
fasterAuthor Commented:
Sorry that I confused you, chensu.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.