dhivya.jayaseelan

Running perl script from VB script in windows

Discussion created by dhivya.jayaseelan on Mar 25, 2014
Latest reply on Apr 9, 2014 by dhivya.jayaseelan

hi, i am trying to run the perl script from vb script in windows environment.The following are the sample files that i created to check its working.The problem is when i am running the .vbs file, command prompt window is flashing and getting close with in a second. what could be the reason for that and where can i be able to find the output of perl script ??? is the following procedure correct ??? how can i pass arguments to the perl script using batch file ???

 

====> .vbs file

 

option explicit

dim oShell

Set oShell = CreateObject("Wscript.Shell")

oShell.CurrentDirectory = "c:\"

oShell.Run ("c:\batchfile.cmd")

SET oShell=nothing

 

====> .cmd file

 

C:\Perl\bin\perl.exe "c:\Perl\bin\myperl.pl"

 

====> .pl file

 

!#usr/local/bin/perl

$in= "xxxxxx";

print $in ;

  

thank you

Outcomes