Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2005
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Putting in cmd lines?

    Hi,

    How can I put command lines into my program which you would normally put in the C:\\Windows\System32\cmd.exe program...lines like..."dxdiag" etc?

    I want my program to be able to run lines like that. How does it work?

    Regards,
    Chris

    EDIT: in C++
    Last edited by The_Pope666; 05-12-2007 at 02:07 PM. Reason: forgot something...

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Well, one way is using the system() call. Like you can do:
    Code:
    system("dxdiag");
    OracleGuy

  • #3
    New Coder
    Join Date
    Jul 2005
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ah cool thanks a lot


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •