Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. redirection of command.com

redirection of command.com

Scheduled Pinned Locked Moved C / C++ / MFC
questioncomhelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    includeh10
    wrote on last edited by
    #1

    when we double click a bat file, we see a DOS window, the program is command.com my question is: can we redirect standard output, error and input streams of command.com to my own app? i.e. in my app, i use CreatePipe(...) for command.com and send command line to it to execute the coomad line then read responding from it to my app. any links or hints for my question? thanks includeh10

    C C 2 Replies Last reply
    0
    • I includeh10

      when we double click a bat file, we see a DOS window, the program is command.com my question is: can we redirect standard output, error and input streams of command.com to my own app? i.e. in my app, i use CreatePipe(...) for command.com and send command line to it to execute the coomad line then read responding from it to my app. any links or hints for my question? thanks includeh10

      C Offline
      C Offline
      CP Visitor
      wrote on last edited by
      #2

      includeh10 wrote: when we double click a bat file, we see a DOS window, the program is command.com my question is: can we redirect standard output, error and input streams of command.com to my own app? i.e. in my app, i use CreatePipe(...) for command.com and send command line to it to execute the coomad line then read responding from it to my app. any links or hints for my question? Try this site: Click[^] especially: http://www.robvanderwoude.com/redirection.html[^]

      I 1 Reply Last reply
      0
      • C CP Visitor

        includeh10 wrote: when we double click a bat file, we see a DOS window, the program is command.com my question is: can we redirect standard output, error and input streams of command.com to my own app? i.e. in my app, i use CreatePipe(...) for command.com and send command line to it to execute the coomad line then read responding from it to my app. any links or hints for my question? Try this site: Click[^] especially: http://www.robvanderwoude.com/redirection.html[^]

        I Offline
        I Offline
        includeh10
        wrote on last edited by
        #3

        i need to redirect to my app, not a file. in other words, command.com is invisible, i can not find clue on the web-site. is it ur site? it looks great. includeh10

        1 Reply Last reply
        0
        • I includeh10

          when we double click a bat file, we see a DOS window, the program is command.com my question is: can we redirect standard output, error and input streams of command.com to my own app? i.e. in my app, i use CreatePipe(...) for command.com and send command line to it to execute the coomad line then read responding from it to my app. any links or hints for my question? thanks includeh10

          C Offline
          C Offline
          CodeBeetle
          wrote on last edited by
          #4

          i created a class to do just that: http://codebeetle.com/page.php?id=33[^]


          CodeBeetle.Com


          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups