redirect bat commands to cmd window

Home Forums Scripting DOS Command Shell redirect bat commands to cmd window

Viewing 1 post (of 1 total)
  • Author
    Posts

  • shmengie
    Member
    #153280

    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:cmd
    cd
    cd xampphtdocsopenauditscripts
    cscript audit.vbs[/CODE]
    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)[CODE]cmd
    cd
    cd xampphtdocsopenauditscripts
    cscript audit.vbs[/CODE]
    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)

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Don't leave your business open to attack! Come learn how to protect your AD in this FREE masterclass!REGISTER NOW - Thursday, December 2, 2021 @ 1 pm ET

Active Directory (AD) is leveraged by over 90% of enterprises worldwide as the authentication and authorization hub of their IT infrastructure—but its inherent complexity leaves it prone to misconfigurations that can allow attackers to slip into your network and wreak havoc. 

Join this session with Microsoft MVP and MCT Sander Berkouwer, who will explore:

  • Whether you should upgrade your domain controllers to Windows Server
    2019 and beyond
  • Achieving mission impossible: updating DCs within 48 hours
  • How to disable legacy protocols and outdated compatibility options in
    Active Directory

Sponsored by: