Computing.Net > Forums > Programming > Automatically run exe without user input

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Automatically run exe without user input

Reply to Message Icon

Name: yuenli
Date: July 26, 2009 at 20:17:26 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

Hi I have an exe which required user to enter a value during the middle run of exe. How to create a batch file to automatically run exe and set the input value as well so that no user interaction is needed? I wish this batch file can be run in quiet mode and with just one click. Is it possible to do this? Thanks.



Sponsored Link
Ads by Google

Response Number 1
Name: tonysathre
Date: July 27, 2009 at 15:01:24 Pacific
Reply:

It will only work if the exe will take command line parameters, or is able to read them from an ini, or similair file. What exe is it?


0

Response Number 2
Name: yuenli
Date: July 27, 2009 at 20:14:23 Pacific
Reply:

Hi I found a way to do this for one input. The | (pipe) will send output from command 1 to command 2. But what if I need to enter 2 inputs means I need to enter a password as well? Anyone know how to do that? Thanks.

ECHO ON
SET username=E
ECHO. %username% | login.exe


0

Response Number 3
Name: klint
Date: July 28, 2009 at 01:52:03 Pacific
Reply:

It is possible to pipe multiple inputs, just split them into multiple
lines, e.g.

(echo %username%
echo %password%) | login.exe

However, you should not handle passwords in a batch file, as it
is not secure and such passwords can be discovered by another
user.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


using multiple inheritanc... Counting number of lines,...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Automatically run exe without user input

Input phrase to prompt and mask it www.computing.net/answers/programming/input-phrase-to-prompt-and-mask-it/9651.html

Hiding user input in a Batch File www.computing.net/answers/programming/hiding-user-input-in-a-batch-file/15928.html

Remove quotes from user input string www.computing.net/answers/programming/remove-quotes-from-user-input-string/19410.html