none
Problems with Outlook 2016 CTR and an Outlook Add-in. RRS feed

  • Question

  • I have a product that has its own desktop exe, database and registry key. It also has an Outlook Add-In. When Outlook loads the add-in, that add-in code accesses the registry key used by the app. This all works just fine when Outlook is installed from an MSI.

    When Outlook is installed as Click-To-Run, things get tricky. CTR is a form of app virtualization based on, but not the same as, APP/V. As such, Outlook CTR has its own private virtualized registry area where Outlook and anything that runs as part of Outlook (like my add-in) redirects whatever registry calls the code makes. This is a problem for my add-in which needs access to my registry key that is outside the virtualization area. So my solution is to place (during install) a symbolic link registry key in the CTR virtual registry area that points to my reg key in the outside world. Sounds complicated but it actually works well and has for quite some time on many versions of Outlook.

    A few days ago, in prep for testing my product on the W10 Creators Edition, I started up my W10x64 VM where Outlook 2016 CTR is installed to do a few tests. Now this VM and Outlook and my add-in app worked just fine the last time I ran tests on this VM. This time, my add-in crashed when loaded by Outlook and then Outlook reported a problem with not being able to find its license and quit. I determined my add-in crashed because my registry key used by the add-in and main exe was gone from the registry. Now Outlook would continue running after my add-in stopped but I could not get it run past the license check. An unexpected double mystery.

    So after some investigation (using procmon to watch the registry) I determined that the OfficeClick To Run.exe executable that is invoked when you start a CTR app (before Outlook.exe is launched) is specifically locating and deleting my symbolic link registry key (which meant it deleted my key in the regular registry but the link remains in place). This would happen each time I started Outlook. I uninstalled and reinstalled my app many times but nothing helped. And even after I uninstalled my app, Outlook continued to have the license problem. I then determined that on a full uninstall, my installer was not removing the symbolic link as it should. Now fully suspicious that the registry was corrupted in some manner, I manually deleted the symbolic link.

    Viola! After doing that Outlook is back to normal. Finds its license and all is well. So I installed my app again and it all works fine. Uninstall and reinstalled several times and all still works fine. Worked fine for several days.

    Then I applied waiting updates to Windows 10 and after the update reboot, OfficeClick To Run.exe is back to deleting my registry key. There is also a new wrinkle, if my symbolic link is present in the CTR virtual registry, the key the link points to is being deleted on Windows reboot...Outlook is not executed.

    I am stumped as to what is going on here. Other Outlook CTR installations I have seem to be working fine.

         
    Friday, May 5, 2017 10:01 PM

All replies

  • Hi Richard Corn,

    every time when you install new updates lots of things get changed.

    so we can't predict that what will going to change next time.

    as we can see that you are adding registry key in CTR version which can cause this issue.

    so there is no any permanent solution is available for this issue.

    you need to find work around to provide this feature to your users who are using CTR versions.

    or add pre requirement for your app to install Outlook from MSI.

    if Outlook is CTR version then inform user to install outlook using MSI and close the app.

    other thing you had mentioned that other outlook CTR versions are working fine.

    did you install the same updates on that machines too?

    if not then try to install the same updates and try to check the difference.

    it can help to narrow down the issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 8, 2017 8:16 AM
    Moderator
  • After more research I found that this problem appears to only exist in some versions of Office 365/outlook click-to-run. The systems I had that worked were on either earlier or later versions than the system that was failing. Updating to Office 365 version 1703 seems to have cured the problem.
    Tuesday, May 9, 2017 8:01 PM
  • Hi Richard Corn,

    its nice to hear that with updating the Office 365 solves your issue.

    its seems that it is some kind of bug in CTR version.

    please try to submit your feedback to Outlook user voice Regarding this issue.

    Outlook Feedback

    so that Outlook developers will come o know about this issue.

    from your last post , it looks like issue was resolved in new update. so if your issue was solved then try to mark your last post as an answer.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 10, 2017 7:58 AM
    Moderator