Reputation: 11
We have a CTI program which uses IE-Framework and opens its content in Internet Explorer. We would like to use Firefox instead of IE, but the developers refuse to change anything.
So I thought about an URL-Handler.
The CTI-Program uses an URL like https:://software/database/profile=%1.php
I can tell the program to use a URL-handler.
So the finished URL would look like workaround:https:://software/database/profile=%1.php
I made these registry entries:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\workaround]
@="URL:workaround Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\workaround\shell]
[HKEY_CLASSES_ROOT\workaround\shell\open]
[HKEY_CLASSES_ROOT\workaround\shell\open\command]
@="\"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe\" "%1"
Upon opening workaound:google.de
Firefox opens infinite numbers of tabs.
Same with workaround:"google.de"
Opening workaround: without anything opens Firefox without a page
Sure, I could add the URL to the registry but the program delivers a variable depending on the database entry of whom is calling.
Does anyone have an idea what parameter Firefox needs?
Thanks in Advance
Upvotes: 0
Views: 4644
Reputation: 33296
Firefox command line options can be found on MDN at Command Line Options. Specifying a URL can be done with, or without, the -url
option. If you desire, you can explicitly open the URL in a new tab (-new-tab
) or new window (-new-window
). Not using either of those options uses the current default, as specified in preferences by the user.
However, one problem appears to be that the following line has an unmatched quotation mark:
@="\"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe\" "%1"
There are 5 "
characters on the line. Under most circumstances, I would expect you to need an even number. You probably intended the line to be:
@="\"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe\" \"%1\""
Further, it appears, based on the information at Registering an Application to a URI Scheme, that the URL which you are passing to Firefox is:
workaound:google.de
In other words, including the workaround:
. Firefox, of course, has no knowledge of how to handle the workaround:
protocol. You will need an intermediate step/program/script to strip the workaround:
from the URL passed to Firefox. There are a large number of different ways which you could do this. What you choose will depend on your environment and the tools with which you prefer to work.
For debugging purposes, you might want to temporarily use a executable other than Firefox which will permit you to see exactly the command line which you are passing to Firefox.
As to how to pre-parse the argument to remove the workaround:
, the following question and answers should give you a starting point:
Launch .bat files from a custom URL handler without showing the console window
Upvotes: 1