Reputation: 10834
I'm looking to create an installer that will add a handler for a MIME type in Firefox and Explorer. The installer I will be using will be either INNO (a.k.a Oh Nooo!) or NSIS.
How do Mozilla and Microsoft recommend adding a handler. So far all I have been able to find for Firefox is how to Add/Remove/Augment manually which no matter how simple is something I would like to hide from the user.
Upvotes: 3
Views: 6852
Reputation: 500
In firefox quantum the mime handlers are in a file called handlers.json in your firefox profile directory. On windows that directory is located in %APPDATA%\Mozilla\Firefox\Profiles , which typically expands to C:\Users\yourname\AppData\Roaming\Mozilla\Firefox\Profiles
The name of the default profile directory has random alphanumeric name with a .default extension, e.g. v3c92uhd.default
If you edit the handlers.json file, make sure to save it in json compressed form and UTF8 encoding, otherwise firefox will refuse to read it.
Upvotes: 0
Reputation: 1093
For NSIS, to register your application as default for a given MIME type, you can either :
If the mime-type is correctly registered, I don't think you'll have any problem.
There's an explanation here on how Firefox handles MIME / file mapping.
Upvotes: 2
Reputation: 1
this worked for me Launching a registered mime helper application
but if you want that firefox opens the handler without asking anything (like when you check the "do this always" or how is it called), you'll probably have to mess with mimeTypes.xml. see http://www.math.ubc.ca/MathNet/FAQ/index.shtml?FirefoxHelper.html
Upvotes: 0