Solved

How to run an external application

Posted on 1998-08-12
2
195 Views
Last Modified: 2010-04-02
I would like to run an external application, and or give a commmand from within my MS Visual c++ program.

At the moment the command I'd like to issue is "IPCONFIG > stat.dat"
0
Comment
Question by:kraphics
2 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
ID: 1170040
You can use the system() function from the C runtime library:

system("IPCONFIG >STAT.DAT");

0
 
LVL 22

Expert Comment

by:nietod
ID: 1170041
I think there are more ways to run programs than there are programs to run   : - )

You also might want to consider CreateProcess() or the exec() class of functions  (there are about 10 of them).  Each way has its own merits.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

679 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