Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Windows .pl file assoc vs. cmd prompt

by Anonymous Monk
on Apr 08, 2005 at 14:15 UTC ( #446017=note: print w/replies, xml ) Need Help??


in reply to Windows .pl file assoc vs. cmd prompt

As far as I understand it, there's not really any way to know that.

Assuming you're using ActiveState Perl, the default action on files of type .pl is (approximately):

"d:\perl\bin\perl.exe" "%1" %*

for values of your AS Perl bin directory, of course. It calls perl, but not in any particularly special way.

You could maybe modify that to include a special option, like

"d:\perl\bin\perl.exe" "%1" "--I-was-double-clicked" %*

but that's an ugly hack, and it'll fail with scripts using Getopt::Long, because (IIRC) those scripts choke and die on command-line options they don't understand.

You might want to look into Win32 and Win32::GUI. I know it's possible to hide your console window using the latter, and if I can turn up the code in which I did that (a couple years ago), I'll post the relevant exemplary bits. I don't know much about the Win32 API interface in general, though, so can't be much help to you there.

HTH; HAND.

  • Comment on Re: Windows .pl file assoc vs. cmd prompt

Replies are listed 'Best First'.
Re^2: Windows .pl file assoc vs. cmd prompt
by Anonymous Monk on Apr 08, 2005 at 14:16 UTC
    ...or I'm not half as smart as I think I am. Anyway...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://446017]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2017-11-20 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (282 votes). Check out past polls.

    Notices?