Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: How to run external win32 process in Perl/Tk

by thunders (Priest)
on Sep 27, 2002 at 03:03 UTC ( [id://201111]=note: print w/replies, xml ) Need Help??


in reply to How to run external win32 process in Perl/Tk

PerlApp does not create freestanding .exe files by default for some reason. And the evaluation version can't do it at all, but If you have the full version, all you need to do is pass it a flag.

perlapp -f my_script.pl

now you will have a program called my_script.exe that will work on a computer that doesn't have Perl. there are a lot of other cool options availible with Perlapp see perlapp --help

Replies are listed 'Best First'.
Re: Re: How to run external win32 process in Perl/Tk
by Mr. Muskrat (Canon) on Sep 27, 2002 at 14:44 UTC

    The PDK PerlApp Docs say that it creates freestanding executables by default. Also, you can create freestanding executables with the evaluation version but they will stop working when the evaluation period ends. Just be sure that you are using the latest version because it fixes some bugs.

    If you run perlapp with the --xclude command line option (which I don't recommend), you will need to include perl56.dll with your program in order for it to work.

    So you can call your executable like this:

    my $command = ".\\destroy.exe"; # change path as needed my $args = ""; my $process; Win32::Process::Create($process, $command, $args, 0, DETACHED_PROCESS, '.') || &error(); # fixed typo

    Update: I think the code sample is right. If not, can someone please tell me what is wrong with it?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-20 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found