Is it possible from inside an extension to get the path of an application from a mimetype

Saying I like to get the path of the program that runs when I get an document of the mimetype "application/pdf"

Is it possible?

Should something like work?

var mimeSvc = Components.classes["@mozilla.org/uriloader/external-helper-app-service;1"].getService(Components.interfaces.nsIMIMEService);
var x = mimeSvc.getFromTypeAndExtension("application/pdf", null);
var p = x.preferredApplicationHandler.path);

Well it doesn't but I'm not sure how to proceed.


--
Henrik Gemal
Mozilla Evangelist

Mozilla Blog with news, devinfo, links, etc:
http://gemal.dk
_______________________________________________
mozilla-embedding mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to