Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^5: executing a .bat or .exe from within perl script ??

by Anonymous Monk
on Aug 21, 2017 at 08:16 UTC ( #1197720=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: executing a .bat or .exe from within perl script ??
in thread executing a .bat or .exe from within perl script ??

Hi Eric. I have used 'System' in the middle of the Perl script to launch .exe File. It launched successfully, But it will be in the pause mode until we close that .exe File. Ant then the rest of the code will run. Do you we have any other way that, the code should run until script end? I also tried using subroutines. But does not work. Hence instead i used 'exec'at the end of the script and then called a another part of Perl script.

  • Comment on Re^5: executing a .bat or .exe from within perl script ??

Replies are listed 'Best First'.
Re^6: executing a .bat or .exe from within perl script ??
by Corion (Pope) on Aug 21, 2017 at 08:22 UTC

    If you do not want to wait for the exe program to finish, you can use the Windows-specific form of system (see perlport):

    system( 1, "C:\\Path\\to\\that.exe" ) == 0 or warn "Couldn't launch program: $^E";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1197720]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2020-07-08 05:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?