Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling another program from C++ and applying switches.

Status
Not open for further replies.

pghsteelers

Technical User
Apr 21, 2006
121
US
Curious on how you can call another program from C++ and apply switches to a program you are calling that it will accept.

i.e. if it is an .msi file and any MSIEXEC switch, or maybe a install shield and switches such as /s or /r

I am currently in the process of learning C++ but haven't come across this information but would like to start using it while I am learning it and these are a few peices of information that I am lacking.

Thanks in advance.
 
You can use the system() function.
Ex.
Code:
system( "dir /b | sort" );
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top