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

Replies are listed 'Best First'.
Re^3: Calling an executable and entering login credentials
by Mr. Muskrat (Canon) 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.

Re^3: Calling an executable and entering login credentials
by afoken (Chancellor) 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.