Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Calling an executable and entering login credentials

by Thomas Kennll (Acolyte)
on Sep 02, 2012 at 17:34 UTC ( #991311=note: print w/ replies, xml ) Need Help??


in reply to Re: Calling an executable and entering login credentials
in thread Calling an executable and entering login credentials

Thanks for the reply! Actually the application is a .bat file and when I run this manually a login/password prompt pops up.. I need to put in the username and password and then submit it.. Something like a form program.. I want my perl script to interact to this .bat file and put in the credential and submit..


Comment on Re^2: Calling an executable and entering login credentials
Re^3: Calling an executable and entering login credentials
by afoken (Prior) on Sep 02, 2012 at 17:57 UTC

    Batch files don't ask for passwords. Programs invoked by the batch files do that. Look at the batch file, find out which program asks for a password, read its documentation and find a way to pass the password on the command line. Or look at tools like AutoIt that are written to interact with GUIs.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      Yeah.. There are some java programs doing that.. Is there anyway, that I can call the batch files from the script and then input the credentials using some modules ?
        You can try Win32::GuiTest, it seems it's able to send clocks and keystrokes to windows. Also you can use AutoHotKey or AutoIt to write a credentials-entering program, but this is not Perl.
        Sorry if my advice was wrong.
Re^3: Calling an executable and entering login credentials
by Mr. Muskrat (Abbot) on Sep 02, 2012 at 19:49 UTC

    To interact with GUI programs on Windows, you should check out Win32::GUITest and its excellent examples.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991311]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2015-07-07 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (85 votes), past polls