Question : Need help allowing a perl script running in IIS execute a .exe

My perl script attempts to execute c:\plink.exe in order to connect over SSH to a remote Linux host and execute a command.

The script seems to be stuck trying to execute the plink.exe command.  The same code runs fine under Apache 2.0.  I'm sure there is something I need to do in my IIS configuration to allow it to run the .exe, but I'm not sure what steps I need to take.  

I can see it's getting hung up on that command because I'm not outputting the "DEBUG" on the next line in the code.  The output I am getting just says...

Executing: C:\plink.exe -l developer -pw devpwd serverA "sudo installApp.pl --ear=CCSEAR.ear --env=demo"


Code snippet is included below:
Code Snippet:
1:
2:
3:
4:
$cmd= "C:\\plink.exe -l developer -pw devpwd serverA  \"sudo installApp.pl --ear=CCSEAR.ear --env=demo\" ";
print "Executing: $cmd\n";
system("$cmd");
print "DEBUG\n";
Open in New Window Select All

Answer : Need help allowing a perl script running in IIS execute a .exe

One other thing that might work...

You said:
>>you will be promopted if you want to add the servers ssh key to your cache.
To have the webserver answer the question, you could use:
    system("echo yes|$cmd");
where yes would be whatever you need to enter to answer the plink question.
Random Solutions  
 
programming4us programming4us