Magnus Eriksson wrote:
>
> I'm having a slight problem using the system() function in ActivePerl (I'm
> using ActivePerl 5.8)
>
> Example:
> system("app.exe","parameter1","parameter2");
>
> This works fine executing app.exe with parameter1 & parameter2. The problem I
> have is that app.exe requires additional user input in form of a password to
> run the requested action. I would like my perl script to supply this password
> as well as the parameters, not prompting the user for the password.
>
> Is this possible? How do I go about doing this?
Hi Magnus.
This is a notoriously difficult problem, especially for Windows users. Which
Windows are you using? 98 and NT were largely undocumented and, more
importantly, unlike Unix; but XP is much better.
Take a look at
perldoc perlopentut
and search for 'Pipe Opens'. Doing something like
open APP, "| app.exe parameter1 parameter2"
and
print APP 'secret'
to enter the password /may/ work, but be prepared to do a lot of
experimentation! A lot also depends on how the application has been written.
HTH,
Rob
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs