Solved

How to run an external application

Posted on 1998-08-12
2
194 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

838 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