http://qs321.pair.com?node_id=293728


in reply to Re: Re: Small Problem with running Perl Scripts in Windows
in thread Small Problem with running Perl Scripts in Windows

I have a funny feeling I saw a post somwhere that gave instructions for doing this (for Tk gui scripts) but I can't find it. Hopefully, someone else will notice this post and know.

First, I've never used WxPerl, or Win98 so whether this will work for you I have no idea. This is what I have set up for Tk scripts which prevents any console window being displayed at all under AS 5.8 and NT4.

P:\test>assoc .plb .plb=perl_background_script P:\test>ftype perl_background_script perl_background_script=wperl.exe "%1"

In order for this to work, wperl.exe has to have a flag set in the executable to indicate that it is to run in the WINDOWS subsystem rather than as a console app. I cannot remember if it is set up this way out of the box, or whether I had to modify it to be so. The easy way to check is to use the exetype.bat program that you'll find in your perl\bin directory. If this reports the WINDOWS subsystem as below, the above associations should allow you to double-click .plb scripts in the explorer and have them run without any console window showing up.

P:\test>exetype \bin\wperl.exe \bin\wperl.exe uses the WINDOWS subsystem.

However, if it reports wperl.exe to be a CONSOLE app,

P:\test>exetype \bin\perl5.8.0.exe \bin\perl5.8.0.exe uses the CONSOLE subsystem.

then you need to modify it by adding the WINDOWS parameter on the same command

P:\test>exetype \bin\wperl.exe WINDOWS

I suspect that this is the diference between wperl.exe and perl.exe and you don't need to do this, but I included the info in case my memory is wrong, and I had to do this myself previously.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
If I understand your problem, I can solve it! Of course, the same can be said for you.