Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: system command in background

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2008
    Posts
    6

    system command in background


    i have a line in my code
    system("dir") in a program in dev c++
    it causes a seperate window command prompt to open and then it executes.

    can we run it in background so that user does not even know of execution of the command

  2. #2
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,979

    Re: system command in background

    This doesn't have anything to do with OpenGL. I suggest you ask this question in a C++ forum...

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2008
    Posts
    6

    Re: system command in background

    it is being used in part of my opengl project .

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: system command in background

    It doesn't matter if your project uses OpenGL or not. Running a system command in the background is totally irrelevant to OpenGL.

  5. #5
    Junior Member Regular Contributor
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    128

    Re: system command in background

    I agree with Bob; this is unrelated to OpenGL. Try CodeProject.com for example.

    But to answer to this question shortly: No, you can't. The system function always opens up a console window displaying the results of the command. You can try using popen, or even better, use the Windows API to get directory contents. Ask from C++ forum for details.
    Henri H.

  6. #6
    Junior Member Newbie
    Join Date
    Jan 2008
    Posts
    6

    Re: system command in background

    thanks Henri H

Posting Permissions

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