How to get absolute path of application from file mime type
23 views
Skip to first unread message
epplestun
unread,
Jun 22, 2012, 5:32:26 AM6/22/12
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
I want to get application full path from specific MIME type with XPCOM
components, is posible?
I'm using MIMEService to get mimetype of file and I need to get the
application path who opens this file type.
Any ideas?
Thanks
Boris Zbarsky
unread,
Jun 22, 2012, 11:06:35 AM6/22/12
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Use nsIMIMEService.getFromTypeAndExtension to get an nsIMIMEInfo.
Then look at its preferredApplicationHandler (which may be null), QI it
to nsILocalHandlerApp (which it may fail to do), and look at the
.executable nsIFile.