Bug 1697669 Comment 11 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Sorry, we had some "heavy lifting" to do elsewhere and couldn't look at this earlier.

So we removed our prefs:
ldap_2.servers.Outlook.uri	moz-aboutlookdirectory:///
ldap_2.servers.Outlook.description	Outlook
ldap_2.servers.Outlook.dirType	3

and applied the patch after editing the "x" out of "moz-aboutlookxdirectory:///" in addressbook.js. In the address book window in the file menu we then see a "Use Outlook Address Book" entry. When checking it, we get this in the console:
JavaScript error: chrome://messenger/content/addressbook/addressbook.js, line 1120: NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "too much recursion" {file: "resource:///modules/AddrBookManager.jsm" line: 211}]'[JavaScript
 Error: "too much recursion" {file: "resource:///modules/AddrBookManager.jsm" line: 211}]' when calling method: [nsIAbManager::deleteAddressBook]

Looks like this `MailServices.ab.deleteAddressBook(kOutlookDirectoryURI);` will not work since you need to specify a decent URI here and there can be more than one OL AB.

Despite this, the OL AB is included in the tree view, so that's a plus.

From comment #8: Why is the dirType -1?

Finally, it still works here with the code below "Is Outlook installed" restored. The menu comes up quickly. The official check for whether OL is installed would entail a search in the Windows registry for these keys where HKXX is HKCU or HKLM:
HKXX\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\outlook.exe
HKXX\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\outlook.exe
HKXX\SOFTWARE\Microsoft\Office\NN\Outlook\InstallRoot
HKXX\SOFTWARE\WOW6432Node\Microsoft\Office\NN\Outlook\InstallRoot
HKXX\SOFTWARE\Microsoft\Office\NN\Common\InstallRoot
HKXX\SOFTWARE\WOW6432Node\Microsoft\Office\NN\Common\InstallRoot
HKXX\SOFTWARE\Microsoft\Office\NN\ClickToRunStore\Applications
HKXX\SOFTWARE\WOW6432Node\Microsoft\Office\NN\ClickToRunStore\Applications
where NN is one of "12.0", "14.0", "15.0", "16.0". Note that 12.0 is Office 2007 with likely won't work.
Sounds like fun? Well, there is more fun. MAPI won't work if the bit-ness of Office/OL doesn't match the bit-ness of TB.
I guess you could limit the check to looking for those registry keys in a suitable loop and if you find one, OL is likely installed. On the machine here we see three of them:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\16.0\Outlook\InstallRoot
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\16.0\ClickToRunStore\Applications

What to do with the feedback request. You've got our feedback, it's a bit on the "not quite ready/working" side.
Sorry, we had some "heavy lifting" to do elsewhere and couldn't look at this earlier.

So we removed our prefs:
ldap_2.servers.Outlook.uri	moz-aboutlookdirectory:///
ldap_2.servers.Outlook.description	Outlook
ldap_2.servers.Outlook.dirType	3

and applied the patch after editing the "x" out of "moz-aboutlookxdirectory:///" in addressbook.js. In the address book window in the file menu we then see a "Use Outlook Address Book" entry. When checking it, we get this in the console:
JavaScript error: chrome://messenger/content/addressbook/addressbook.js, line 1120: NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "too much recursion" {file: "resource:///modules/AddrBookManager.jsm" line: 211}]'[JavaScript
 Error: "too much recursion" {file: "resource:///modules/AddrBookManager.jsm" line: 211}]' when calling method: [nsIAbManager::deleteAddressBook]

Looks like this `MailServices.ab.deleteAddressBook(kOutlookDirectoryURI);` will not work since you need to specify a decent URI here and there can be more than one OL AB.

Despite this, the OL AB is included in the tree view, so that's a plus.

From comment #8: Why is the dirType -1?

Finally, it still works here with the code below "Is Outlook installed" restored. The menu comes up quickly. The official check for whether OL is installed would entail a search in the Windows registry for these keys where HKXX is HKCU or HKLM:
HKXX\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\outlook.exe
HKXX\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\outlook.exe
HKXX\SOFTWARE\Microsoft\Office\NN\Outlook\InstallRoot
HKXX\SOFTWARE\WOW6432Node\Microsoft\Office\NN\Outlook\InstallRoot
HKXX\SOFTWARE\Microsoft\Office\NN\Common\InstallRoot
HKXX\SOFTWARE\WOW6432Node\Microsoft\Office\NN\Common\InstallRoot
HKXX\SOFTWARE\Microsoft\Office\NN\ClickToRunStore\Applications
HKXX\SOFTWARE\WOW6432Node\Microsoft\Office\NN\ClickToRunStore\Applications
where NN is one of "12.0", "14.0", "15.0", "16.0". Note that 12.0 is Office 2007 which likely won't work.
Sounds like fun? Well, there is more fun. MAPI won't work if the bit-ness of Office/OL doesn't match the bit-ness of TB.
I guess you could limit the check to looking for those registry keys in a suitable loop and if you find one, OL is likely installed. On the machine here we see three of them:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\16.0\Outlook\InstallRoot
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\16.0\ClickToRunStore\Applications

What to do with the feedback request. You've got our feedback, it's a bit on the "not quite ready/working" side.
Sorry, we had some "heavy lifting" to do elsewhere and couldn't look at this earlier.

So we removed our prefs:
ldap_2.servers.Outlook.uri	moz-aboutlookdirectory:///
ldap_2.servers.Outlook.description	Outlook
ldap_2.servers.Outlook.dirType	3

and applied the patch after editing the "x" out of "moz-aboutlookxdirectory:///" in addressbook.js. In the address book window in the file menu we then see a "Use Outlook Address Book" entry. When checking it, we get this in the console:
JavaScript error: chrome://messenger/content/addressbook/addressbook.js, line 1120: NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "too much recursion" {file: "resource:///modules/AddrBookManager.jsm" line: 211}]'[JavaScript
 Error: "too much recursion" {file: "resource:///modules/AddrBookManager.jsm" line: 211}]' when calling method: [nsIAbManager::deleteAddressBook]

Looks like this `MailServices.ab.deleteAddressBook(kOutlookDirectoryURI);` will not work since you need to specify a decent URI here and there can be more than one OL AB.

Despite this, the OL AB is included in the tree view, so that's a plus.

From comment #8: Why is the dirType -1?

Finally, it still works here with the code below "Is Outlook installed" restored. The menu comes up quickly. The official check for whether OL is installed would entail a search in the Windows registry for these keys where HKXX is HKCU or HKLM:
HKXX\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\outlook.exe - Path or (default)
HKXX\SOFTWARE\Microsoft\Office\NN\Outlook\InstallRoot - Path
HKXX\SOFTWARE\WOW6432Node\Microsoft\Office\NN\Outlook\InstallRoot - Path
HKXX\SOFTWARE\Microsoft\Office\NN\Common\InstallRoot - Path
HKXX\SOFTWARE\WOW6432Node\Microsoft\Office\NN\Common\InstallRoot - Path
HKXX\SOFTWARE\Microsoft\Office\NN\ClickToRunStore\Applications - Outlook
HKXX\SOFTWARE\WOW6432Node\Microsoft\Office\NN\ClickToRunStore\Applications - Outlook
where NN is one of "12.0", "14.0", "15.0", "16.0". Note that 12.0 is Office 2007 which likely won't work.
Sounds like fun? Well, there is more fun. MAPI won't work if the bit-ness of Office/OL doesn't match the bit-ness of TB.
I guess you could limit the check to looking for those registry keys in a suitable loop and if you find one, OL is likely installed. On the machine here we see three of them:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE - Path and (default)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\16.0\Outlook\InstallRoot - Path
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\16.0\ClickToRunStore\Applications - Outlook

What to do with the feedback request. You've got our feedback, it's a bit on the "not quite ready/working" side.

Back to Bug 1697669 Comment 11