Can I issue a command to DOS from within a program?

This is a discussion on Can I issue a command to DOS from within a program? within the Windows Programming forums, part of the Platform Specific Boards category; I am making a project for school, and in a part of it, I would like (if possible) to launch ...

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    2

    Can I issue a command to DOS from within a program?

    I am making a project for school, and in a part of it, I would like (if possible) to launch a DOS program from this program (the project). The system to be running this project program is a DOS system (its also got windows 98, but we have to make the project limited to DOS).
    So, my question is, is it possible to launch a DOS command through the program?
    I know I saw something similar to this somewhere before, and I haven't been able to find it now, so that is why I ask this. The program I had seen before asked the user what command he/she wants to issue to the console.

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    You can issue a console command using the system function.

    It is likely that your program is a console program rather than a true DOS program.

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    2
    thanks. i will try this out on a school computer and report back here.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Odd issue with program
    By TigerTank77 in forum C Programming
    Replies: 8
    Last Post: 05-12-2009, 01:00 AM
  2. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 02:42 AM
  3. Run dos program invisibly?
    By chico1st in forum Windows Programming
    Replies: 2
    Last Post: 01-07-2009, 10:07 AM
  4. Issue with program that's calling a function and has a loop
    By tigerfansince84 in forum C++ Programming
    Replies: 9
    Last Post: 11-12-2008, 01:38 PM
  5. initialising a DOS program from a C enviroment
    By Robert_Ingleby in forum C Programming
    Replies: 5
    Last Post: 03-07-2002, 01:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21