Jump to content

Recommended Posts

Posted

Hi,

I have checked the forum and have not found a problem exactly like mine.  What I am trying to do seems simple enough but as it turns isn't.  I have a special tool which must be run from cmd.  Right now let's call this program memory_dump.exe and it resides in C:Temp.  It also requires UAC.  So I try to run it using:

#include <MsgBoxConstants.au3>

#RequireAdmin

RunWait(@Compsec & "/c C:Tempmemory_dump.exe")

Send("y")

But cmd launches the program in a new terminal which then waits for the user to press "y".  What I can't figure out is how to send the "y" to the program in a new terminal.  So for clarity, there are two programs, the original cmd with a console program running in a new instance of cmd.

Any help would be great.

Posted (edited)

Welcome to the forum, :thumbsup:

Just insert a sleep(3000) after run to give the second CMD time to initiate.

3000 might be too much. Adjust to your needs.

Edited by Exit

App: Au3toCmd              UDF: _SingleScript()                             

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...