Unregister the Outlook add-in via Code ?

Add-in Express™ Support Service
That's what is more important than anything else

Unregister the Outlook add-in via Code ?
 
chathum henegama




Posts: 23
Joined: 2011-02-09
Hi i'm just wondering whether there is a way i can Unregister the add-in in the code itself after checking a condition in the AddinModule_AddinInitialize event. The problem context is i have installed my add-in in a Multi-User environment and i get some high resource usage notifications.

Currently what i do in the AddinModule_AddinInitialize event is

if the condition fails(or false)
i do following actions

AdxOlFormsManager1.Items.Clear()
AdxRibbonTab1.Visible = False
AdxCommandBar1.Visible = False

Thanks in Advance Guys



:!:
Posted 13 Apr, 2011 08:28:43 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Chathum,

You are on the right avenue. There is no way to unregister an add-in at runtime. Instead, you can disable the add-in UI and event handlers in the project. Please use the AddinInitialize event handler to turn off command bars and the OnRibbonBeforeLoad event to turn off Ribbon UI (just set the e.XML to an empty string). Also please don't forget about the event handlers of your add-in project. You need to disable them too.
.NET, Extended MAPI, Windows Phone & RT
Posted 13 Apr, 2011 12:46:34 Top
chathum henegama




Posts: 23
Joined: 2011-02-09
Thanks for your reply Eugene,
The problem i am having is i installed this on a Citrix environment for all-users using the Admin account. I need my addin to be used only by a group of users.(Not all) But when the outlook is running the addin actually runs(technically) though it does not appear to users. As a result of this i am getting high usage alert on CPU context switching(can provide you some screenshots if you like). Any suggestions on that ?

Thanks
Posted 14 Apr, 2011 04:24:09 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Chathum,

Is the certificate revocation option enabled?
.NET, Extended MAPI, Windows Phone & RT
Posted 14 Apr, 2011 04:36:16 Top
chathum henegama




Posts: 23
Joined: 2011-02-09
I am not sure about that. Just give me a little time check and get back to you
Posted 14 Apr, 2011 04:48:55 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Chathum,

Please keep me notified.
.NET, Extended MAPI, Windows Phone & RT
Posted 14 Apr, 2011 04:58:26 Top
chathum henegama




Posts: 23
Joined: 2011-02-09
Yes Certificate revocation is enable on Citrix Server.
Posted 14 Apr, 2011 05:07:42 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Chathum,

That is the cause of the delay issue. Please try to disable it and then let me know whether it helps.
.NET, Extended MAPI, Windows Phone & RT
Posted 14 Apr, 2011 05:16:41 Top
chathum henegama




Posts: 23
Joined: 2011-02-09
Hi there,
Will there be any other impacts if we disable it on Citrix server ?

Thanks
Posted 14 Apr, 2011 05:45:22 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Chathum,

Yes, it will. The time of loading your add-ins will be decreased. Please let me know the results in any case.
.NET, Extended MAPI, Windows Phone & RT
Posted 14 Apr, 2011 05:54:04 Top