Announcement

Collapse
No announcement yet.

redirect bat commands to cmd window

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • redirect bat commands to cmd window

    i can't believe i've never done this before, and that i can't figure it out. i have a batch file on my desktop called audit.bat, and this is it:
    Code:
    cmd
    cd\
    cd xampp\htdocs\openaudit\scripts
    cscript audit.vbs
    simple enough. but, after the cmd command, none of the text is redirecting to the cmd window. so, i rem'd out the cmd command and tried running the bat file from the cmd window, with no luck. (i found a reference to the stdout command which looks like it's supposed to redirect the text to the cmd window, but that didn't work, either).

    this has to be so simple and obvious that i'm just overlooking it. can someone please advise?

    thx!

    (ps, i'm running this on w7 pro, if it makes a difference)

  • #2
    Re: redirect bat commands to cmd window

    Have you tried it like this:

    Code:
    cmd /k cscript C:\xampp\htdocs\openaudit\scripts\audit.vbs
    This should open a command window run the command in the string after /k and remain open after it finishes.

    Comment


    • #3
      Re: redirect bat commands to cmd window

      lol, like i said, i knew it would be simple and obvious. thx a mil!

      Comment

      Working...
      X