Disable addin on Terminal Server for some users

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

Disable addin on Terminal Server for some users
 
Raymond Bolder




Posts: 66
Joined: 2009-06-03
Hi All,

I got a question from a customer.
The want the addin to be installed on a terminal server.
But for some users they do not want the addin to be shown.
Now i tested it on a Terminal server.

In the HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\Name of my addin\
i set the value of loadbehaviour form 3 to 2 wich should disable the pluging.

However when i start outlook after this the addin is executed.

When i change the key
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\Outlook\Name of my addin\
i set the value of loadbehaviour form 3 to 2 wich should disable the pluging.
Then the addin is not executed.

Is it possible to disable the addin using the setting in current user or is something wrong in my project?
Or is it a Microsoft Thingy :) because i saw when i changed the value on my laptop that it changed the key in the local machine.

I Hope you can help me.

Greets Ray
Posted 14 Jul, 2010 08:48:00 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hi Ray,

You cannot prevent a per-machine add-in from loading for certain users. But in your code you can check if the user meets some conditions and if doesn't meet the conditions, you can remove all Add-in Express controls from the add-in module and detach event handlers specified on the module level; this can be done in AddinInitialize or OnRibbonBeforeCreate whichever occurs first. In this case, your add-in will be loaded but no UI and functionality will be provided.


Andrei Smolin
Add-in Express Team Leader
Posted 14 Jul, 2010 11:51:12 Top
Raymond Bolder




Posts: 66
Joined: 2009-06-03
Hi Andrei,

Thank you for your response.
Do you maybe have a example of how to do this in the correct way (supported).
Or is there a standard command wich i have to call after the initialize.

Greets Ray
Posted 20 Jul, 2010 05:53:09 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Oh, Ray, I'm sorry, we don't have code samples of this.


Andrei Smolin
Add-in Express Team Leader
Posted 20 Jul, 2010 06:04:10 Top