Archive: How to Feed Several Command Prompts Automatically and How to Escape the Semicolon?


How to Feed Several Command Prompts Automatically and How to Escape the Semicolon?
I have a cmd app that once launched prompts you for several pieces of information. How do you go about automatically filling in that information?

app launches
-> username goes here
-> password goes here
-> operation goes here

Is this possible or does it require a plugin? I've almost gone nuts over this as all the code I made to accomplish this when examined under DetailPrint seems perfect.

DetailPrint '"C:\in" deep -user$\'now$\'$\r-pass$\'now$\'$\r-start$\'meth;crystal;ls$\'$\r'
nsExec::ExecToLog '"C:\in" deep -user$\'now$\'$\r-pass$\'now$\'$\r-start$\'meth;crystal;ls$\'$\r'
The above prints the following. It seems perfect except there are no prompts...

"C:\in" deep -user'now'
-pass'now'
-start'meth;crystal;ls'

Thing is, although I am putting carriage returns through, and trying to fill in the prompts, nothing works. I spent so much time on several variations and am too tired to keep trying. I feel I am far off.

Someone please help me. Thank you for your time.

A carrige return is not what you're looking for. The way you're using it, both the line break and the input itself is part of the executing command line. nsExec, ExecWait and friends do not open a command prompt and start filling it up with data. They use the API behind it.

The dosExec plug-in by Takhir accepts a parameter for input to pass to the executed application, if I remember correctly. That should do the trick for you.


Thank you Kichik!
Thank you for the resource Kichik. This is where I found the latest version I hope. http://forums.winamp.com/showthread....94#post1587794

Any idea why Takhir didn't post this onto the arhives?


OK, now in the archive, http://nsis.sourceforge.net/archive/...php?pageid=574 ;)


Great Job Takhir!
Thank you for your time on this plugin. I haven't the chance to work with it yet, but I am hoping to experiment with it as soon as possible. Thank you again Takhir!