I have a batch file "Sample.bat" which I am running using Perl: system("Sample.bat");
Sample.bat
prompts for username and password, these username and password I want to give using a Perl script. For example, when I run this batch file using Perl:
Enter username:
Enter password:
These two things I have to provide using the Perl script.
Batch file:
@echo off
set /p username=Enter your username:%1
set /p password=Enter your password:%2
Perl Script:
my $username="Shaggy";
my $password="shaggy";
my $setup = "C:/sample.bat";
system("$setup $username $password");