Solved

How to run an external application

Posted on 1998-08-12
2
189 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
Comment Utility
You can use the system() function from the C runtime library:

system("IPCONFIG >STAT.DAT");

0
 
LVL 22

Expert Comment

by:nietod
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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…

728 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

10 Experts available now in Live!

Get 1:1 Help Now