windows mozilla perl helper app scripts

P

Philip

I was trying to get a perl based helper app to work with a mozilla
browser on windows.

I have installed activeperl on my XP PC and I can run the helper script
from the MS-DOS window. ie

helper.pl download_file.suffix.

I then set helper.pl as the helper app for a my chosen file type within
the browser preference set up dialog. However, when I try to handle the
download through the browser I get the following error dialog:

"<temporary download.suffix file> could not be opened because an unknown
error occurred.

Sorry about that, try saving to disk first and then opening the file"

I suspect that it is because windows perl scripts are not executed and
handed arguments as transparently as real executable helper apps.

Is there a way around this problem? Have I incorrectly set up perl?
 
M

Mumia W.

Philip said:
I was trying to get a perl based helper app to work with a mozilla
browser on windows.

I have installed activeperl on my XP PC and I can run the helper script
from the MS-DOS window. ie

helper.pl download_file.suffix.

I then set helper.pl as the helper app for a my chosen file type within
the browser preference set up dialog. However, when I try to handle the
download through the browser I get the following error dialog:

"<temporary download.suffix file> could not be opened because an unknown
error occurred.

Sorry about that, try saving to disk first and then opening the file"

I suspect that it is because windows perl scripts are not executed and
handed arguments as transparently as real executable helper apps.

Is there a way around this problem? Have I incorrectly set up perl?

Perhaps you could create a batch file (.BAT) that would invoke perl like so:

c:\path\to\perl.exe helper.pl download_file.suffix
 
P

Philip

Mumia said:
Perhaps you could create a batch file (.BAT) that would invoke perl like
so:

c:\path\to\perl.exe helper.pl download_file.suffix
Yes that worked. Thanks.

I found a utility called pl2bat that made it easier.

Seems funny though that you can't get windows to work otherwise, but
then windows isn't unix.
 
D

Dr.Ruud

Philip schreef:
Is there a way around this problem? Have I incorrectly set up perl?

See

ASSOC /?

and

FTYPE /?



On a W2K-system I get this:

C:\> assoc | find /i "perl"
..pl=Perl


C:\> ftype | find /i "perl"
Perl="C:\Perl\bin\perl.exe" "%1" %*
PerlScriptFile=C:\WINNT\System32\WScript.exe "%1" %*

(I am not saying those settings are right)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top