1

Okay, so I'm a student programmer in my college's IT department, and I'm doing browser compatibility for a web form my boss wrote. I need the user to be able to open a local file from a shared drive with a single click.

The problem is that Firefox and Chrome don't allow that for security reasons. Thus, I'm trying to write a custom protocol of my own to open an address in Internet Explorer regardless of the browser being used.

Can anyone help me with this? I'd also be willing to try an alternative solution to the problem.

Amc32
  • 21
  • 1

2 Answers2

0

The below worked for me, is this what you mean?

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\foo]
@="URL: foo Protocol"
"URL Protocol"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\foo\DefaultIcon]
@="C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\foo\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\foo\shell\open]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\foo\shell\open\command]
@="C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe \"%1\""

Just to note, I'm running Win7Pro, so you may have to move around file path(s) to conform to your environment.

And if that doesn't work, create a proxy between the protocol and the browser, pass the argument(s) from foo:// to that, parse what's necessary, then hand it off to IE using start iexplorer.exe "args".

Brad Christie
  • 100,477
  • 16
  • 156
  • 200
0

I'm unsure whether I understand your question, if it is how do I open local files using chrome/firefox, this is your anwser:

First a disclaimer, I have never done this and cannot vouch for the accuracy of my response

IE

Microsoft's security model is pretty fail so you can go right ahead and open these files

FireFox

Some quick googling found that Firefox can do this after either editing prefs.js as outlined here or installing an addon called LocalLink

Chrome

Practically impossible due to its security, until now when locallink was ported to chrome.

Community
  • 1
  • 1
Tomas Reimers
  • 3,234
  • 4
  • 24
  • 37