OK, we've tried import on a machine without OL. The OL mail and address book import is offered, and when executing it, we get the standard Windows/system message: "There is no email program associated to perform the requested action. Please install a email program or, if one is already installed, create an association in the Default Programs in control panel". That means that there is no checking done at all in import, import just fails on first MAPI access. So if you uncomment the code that is commented-out, you will get this message upon first MAPI access. To hide the menu when no OL is installed, you'll need to check the registry entries mentioned in comment #11.
Bug 1697669 Comment 13 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
OK, we've tried import on a machine without OL. The OL mail and address book import is offered, and when executing it, we get the standard Windows/system message: "There is no email program associated to perform the requested action. Please install a email program or, if one is already installed, create an association in the Default Programs in control panel". That means that there is no checking done at all in import, import just fails on first MAPI access. So if you uncomment the code that is commented-out, you will get this message upon first MAPI access. To hide the menu when no OL is installed, you'll need to check the registry entries mentioned in comment #11. EDIT: Nice example here: https://searchfox.org/comm-central/rev/110f81a3ebc80d0279f9b563ca53a52a4a46366a/mail/base/modules/Windows8WindowFrameColor.jsm#21