Jump to content
Sign in to follow this  
rquebec

Running console-based program from cmd.exe

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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

UDF: _SingleScript()                                        If you like my post, just click the like button :)        here -->

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×
×
  • Create New...