Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 19th February 2005, 05:51   #1
vbgunz
Senior Member
 
Join Date: Jun 2003
Posts: 284
Send a message via AIM to vbgunz
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.

code:
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.
vbgunz is offline   Reply With Quote
Old 19th February 2005, 08:54   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th February 2005, 17:27   #3
vbgunz
Senior Member
 
Join Date: Jun 2003
Posts: 284
Send a message via AIM to vbgunz
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?
vbgunz is offline   Reply With Quote
Old 19th February 2005, 18:42   #4
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
OK, now in the archive, http://nsis.sourceforge.net/archive/...php?pageid=574
Takhir is offline   Reply With Quote
Old 20th February 2005, 02:53   #5
vbgunz
Senior Member
 
Join Date: Jun 2003
Posts: 284
Send a message via AIM to vbgunz
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!
vbgunz is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump