CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Error while invoking .vbs script using system() function.

 



yskumar
New User

May 25, 2011, 2:20 AM

Post #1 of 2 (821 views)
Error while invoking .vbs script using system() function. Can't Post

Hi
I am using a perl script to invoke a .vbs file which will install a software. I want my cscript command to be executed at a particular directory where I have the binaries. And I am making use of system function. I will append the path to the cscript command inside system function. Then it will throw error telling cscript is not recognized, but if I execute cscript from the directory where my perl script is running then it will invoke the vbs script. Please any help will be appreciated.

[$cmd=$bin_Path ."cscript opc_inst.vbs -configure" . $conf_Path ." -inst_dir " . $inst_dir_Path . "-data_dir " . $data_dir;
system($cmd);]


rovf
Veteran

May 26, 2011, 7:34 AM

Post #2 of 2 (796 views)
Re: [yskumar] Error while invoking .vbs script using system() function. [In reply to] Can't Post


Quote
I want my cscript command to be executed at a particular directory where I have the binaries.


perldoc -f chdir


Quote
Then it will throw error telling cscript is not recognized


Maybe you should prepend the absolute path to your cscript?

I'm not sure if my reply really addresses your problem correctly, because I found your question hard to understand.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives