Notes

  1. Implementing an nsICommandLineHandler on Windows may trigger a bug that causes an error message ("Windows cannot find the file specified") to be displayed when opening external links (like from a shortcut or from an external application). Deleting the "(Default)" values in the following registry keys will fix this:

    HKEY_CLASSES_ROOT\HTTP\shell\open\ddeexec
    HKEY_CLASSES_ROOT\https\shell\open\ddeexec

    You can also do this from within your XPCOM component using Windows registry interface.
    Some more links on the matter:
    1. A Mozillazine post.
    2. A blog post.