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

Re: Re: Small Problem with running Perl Scripts in Windows

by bkenik (Initiate)
on Sep 23, 2003 at 21:50 UTC ( #293696=note: print w/replies, xml ) Need Help??

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

I am using WxPerl scripts which run in their own GUI windows. However, when I click on a WxPerl script, the DOS window opens up and remains open until the script terminates. Is there a way to create ftype association (I use .plx extension) to have the DOS window run in "minimized" mode. I using Windows 98 and I am not sure if &comspec% is defined. Thank you for any help you could provided.
  • Comment on Re: Re: Small Problem with running Perl Scripts in Windows

Replies are listed 'Best First'.
Re: Re: Re: Small Problem with running Perl Scripts in Windows
by BrowserUk (Patriarch) on Sep 23, 2003 at 23:23 UTC

    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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2022-01-18 08:32 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (52 votes). Check out past polls.