Closed Bug 284866 Opened 19 years ago Closed 19 years ago

Cannot use Firefox because I need do add custom file extension handlers.

Categories

(Toolkit :: Downloads API, enhancement)

x86
Windows 2000
enhancement
Not set
normal

Tracking

()

RESOLVED EXPIRED

People

(Reporter: nyoung, Assigned: bugs)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

I am a software developer.  I do internets.  I would like all of my clients to
drop IE amd use Firefox.  At present they cannot.  Normally the server does all
of the work.  Sometimes I need to activate a process on a cient's PC. I do this
by providing a download with a unique extension, .SAR, for example. The download
contains instrcutions for what must be done. I have an EXE application
assocaited with the file type but Firefox will not launch the application.

In the "Tools"-"Downloads"-"File Types" section there is a list of file types
which will auto-run but there is no way of adding to this list. However, if you
have several hundred clients it would be a pain to have to manually add an
extension on each computer. (You might have to travell hundreds of miles.) At
present using IE the client can click on an EXE download which installes the EXE
and enables the auto-download.

How can I write an EXE to achive the same thing for Firefox?





installing the extension in the PC's registry and setting the browserflags
setting so that it downloads without confirmation and activates the assocaited
EXE passing the location of the downloaded 


Reproducible: Always

Steps to Reproduce:
N/A
PS My comments are not intended to be in any way offensive.  I think that
FireFox is excellent. And I can see and appreciate all of the time, trouble and
pain that the many people envolved with this project have endured on our behalf.
Please do not implement anything that enables a server to start processes
(with root privileges) on my computer, for the Mac.

Are you looking for an equivalent of Active X?

Would a Remote XUL application do this job?

Are you wanting to do remote installs, if so look at xpi, (or rsync for
a non-browser solution)? Are you wanting to control your clients'
computers, if so look at VNC?

I may have missed the point, but this does not seem to be a vital part
of web browser (client) ... Have you ever found IE to have security
problems ...
Summary: Cannot use Firefox beaucse I need do add custom file extension handlers. → Cannot use Firefox because I need do add custom file extension handlers.
If the server provides a download with an extension of say .xyz I want the
application that has been associated with xyz to start running.  In IE the
download is saved to the temporary Internet folder and your application is
started being passed the file name as a parameter. 

What FireFox should do is:

1) Open the registry "HKEY Classes route" key for the file extension say ".sar"
and get the class name of the handler for that extension example
".sar=SaracsResources.Start"

2) Open the handler registry key, which in this case is, "SaracsResource.Start"
and obtain the values for:

BrowserFlags and EditFlags

If the BrowserFlags is set to 9 then IE will ask for a confirm download. If the
flag is set to 8 no confirm download will be asked.

If the EditFlags is set to 65536 IE will read the registry key to obtain the
shell open command which in this case is: 
SaracsResource.Start\Shell\Open\Command= "r:\saracs\resource.exe" "/O" "%1"
The application will then be activated subsituting the downloaded file name with
the %1 on the command.

If have included 2 file so that you can reproduce the problem:

a) InstallSAR.Reg if you double click on this file it will setup the registry
entries for a test.  The normal application install creates these values in the
registry but I have edited the application exe to call notepad.exe.  If your
windows is not in c:\\winnt you will need to edit tyhis entry.

b) GetETR.SAR is a sample sar file.  If you double click on this file it should
open using notepad.  

c) I have places this GetETR.sar on one of my customer's web servers

http://www.outdoorgear.co.uk/getetr.sar 

If you open this url with IE notepad is launched correctly.  If you open using
Firefox it ignores the EditFlags registry setting and display the file content.

There is no security issue here becuase the Client has to download an installed
which sets the browser & edit flags settings. And is only doen for specific file
types.

I hope this helps:~)

Background information:
I work for the company that does the travel arrangements for the F1 teams.  The
clients are using the browser to run an intranet.  They also access other hosts
as part of an Airline Resavation system using a special interface.  The download
is in fact lists of names.  The application which starts running types the list
of names into the special inteface, saving the staff hours of labour. 

--------------------------------------InstallSAR..reg

Windows Registry Editor Version 5.00

HKEY_CLASSES_ROOT\.SAR]
@="SaracsResources.Start"

[HKEY_CLASSES_ROOT\SaracsResources.Start]
@="Saracs Resources"
"BrowserFlags"=dword:00000008
"EditFlags"=dword:00010000

[HKEY_CLASSES_ROOT\SaracsResources.Start\DefaultIcon]
@="\"c:\\winnt\\notepad.exe\",0"

[HKEY_CLASSES_ROOT\SaracsResources.Start\shell]

[HKEY_CLASSES_ROOT\SaracsResources.Start\shell\edit]

[HKEY_CLASSES_ROOT\SaracsResources.Start\shell\edit\command]
@="\"C:\\WINNT\\NOTEPAD.EXE\"  \"%1\""

[HKEY_CLASSES_ROOT\SaracsResources.Start\shell\open]

[HKEY_CLASSES_ROOT\SaracsResources.Start\shell\open\command]
@="\"c:\\winnt\\notepad.exe\" \"/O\" \"%1\""

[HKEY_CLASSES_ROOT\SaracsResources.Start\shell\print]

[HKEY_CLASSES_ROOT\SaracsResources.Start\shell\print\command]
@="\"c:\\winnt\\notepad.exe\" \"/P\" \"%1\""

[HKEY_CLASSES_ROOT\SaracsResources.Start\shell\printto]

[HKEY_CLASSES_ROOT\SaracsResources.Start\shell\printto\command]
@="\"c:\\winnt\\notepad.exe\" \"/PT\" \"%1\" \"%2\" \"%3\" \"%4\" \"%5\" \"%6\""

----------------------------GetETR.SAR
GETETR

This is an example of a SAR file.
I have modidied the registry file to work better with notepad.exe, use this file
instead of the one posted earlier.

--------------------------------------InstallSAR.reg
Windows Registry Editor Version 5.00

HKEY_CLASSES_ROOT\.SAR]
@="SaracsResources.Start"

[HKEY_CLASSES_ROOT\SaracsResources.Start]
@="Saracs Resources"
"BrowserFlags"=dword:00000008
"EditFlags"=dword:00010000

[HKEY_CLASSES_ROOT\SaracsResources.Start\DefaultIcon]
@="\"c:\\winnt\\notepad.exe\",0"

[HKEY_CLASSES_ROOT\SaracsResources.Start\shell]

[HKEY_CLASSES_ROOT\SaracsResources.Start\shell\open]

[HKEY_CLASSES_ROOT\SaracsResources.Start\shell\open\command]
@="\"c:\\winnt\\notepad.exe\" \"%1\""
Scratches head and thinks.....when I load the getetr.sar from the lan server
(http://tp-server/getetr.sar), FireFox opens the file. When I download the same
file from the remote server (http://www.outdoorgear.co.uk/getetr.sar) I get a
download screen.

Confusing?
I am not going to be of any real help. I don't do windows. Your problem sounds
soluble with any scripting langauge (perl, python, applescript ...), or possibly 
Filemaker (with or without a plugin), but possibly I have a picture of it 
that omits some crucial step.

It is possible that you are looking for Technical Support, in which case you
will get faster and better service at a resource such as
http://forums.mozillazine.org/viewforum.php?f=27 .
i believe the problem is that the server is sending it as application/octet-stream

[timeless@viper ~]$ HEAD http://www.outdoorgear.co.uk/getetr.sar|grep Type
Content-Type: application/octet-stream

change that to application/vnd.vipinertsoft.sar
and setup
[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/vnd.vipinertsoft.sar]
Extension=".sar"

firefox might be more amenable to handling it then
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.