Thread: executing cmd.exe commands?

  1. #1
    Slime Dragoon_42's Avatar
    Join Date
    Feb 2003
    Location
    Vancouver
    Posts
    90

    Question executing cmd.exe commands?

    How do I execute a DOS command from within my program?

  2. #2
    Registered User
    Join Date
    Sep 2005
    Posts
    32
    What exactly do you mean "execute a DOS command" ?

    Are you refering to accessing DOS features while in runtime?

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    Whatever you pass to the system() function in <cstdlib> will be run as if you'd typed it into your command prompt. This assumes you mean the windows command prompt and not actually DOS.

  4. #4
    Slime Dragoon_42's Avatar
    Join Date
    Feb 2003
    Location
    Vancouver
    Posts
    90
    Thanks Daved, that's the function I was looking for. I was afraid to call cmd.exe DOS, because it's not, it's more like an emulator.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Executing DOS commands from inside an image
    By Moony in forum C Programming
    Replies: 6
    Last Post: 03-16-2008, 12:40 PM
  2. Run Error, Commands Executing Simultaneously..
    By MistuRaz in forum C Programming
    Replies: 3
    Last Post: 12-10-2006, 04:10 AM
  3. Executing system commands cross platform
    By markucd in forum C++ Programming
    Replies: 6
    Last Post: 11-04-2005, 08:56 AM
  4. Replies: 1
    Last Post: 03-11-2003, 05:36 PM
  5. Executing shell/dos commands
    By Zaarin in forum C++ Programming
    Replies: 2
    Last Post: 08-28-2001, 10:29 PM