How to make add-in available in normal and in run as admin mode?

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

How to make add-in available in normal and in run as admin mode?
How to prepare add-in and setup project to allow add-in to run normally and run as admin 
Gutek Jakub




Posts: 8
Joined: 2017-06-06
Quick one, i'm trying to make add-in available for users when they are opening office application using run as admin mode. Plugin as addin does not require this permission. However some 3rd party plugins used by end users does require opening application in admin mode.

In this scenario, add-in is not loaded in admin mode. it works perfectly in user mode.

I have read all information available in this forum and support/documents on add-in express page, but i didn't found any solution to my problem.

I have tested:

/privileges=admin
/UAC=On

and InstallAllUsers True (with checking that on user interface) InstallAllUsersVisiable is set to True.

I didn't notice a change (except installation location and asking to elevate permission during installation, no UI changes on installer) when using any of the switches above. Plugin works perfectly for normal user, but when it runs application as admin plugin is not available.

Question is this even possible? To install plugin in the way that it will work for normal user and for same user with run as admin?

Thanks!

Kind regards,
Jakub G
Posted 06 Jun, 2017 09:11:29 Top
Andrei Smolin


Add-in Express team


Posts: 14129
Joined: 2006-05-11
Hello Jakub,

The add-in must be per-machine to bypass this issue.

The issue with a per-user add-in originates from the design decision described at https://blogs.msdn.microsoft.com/cjacks/2008/06/06/per-user-com-registrations-and-elevated-processes-with-uac-on-windows-vista-sp1/; it implemented in Vista SP1 and all subsequent Windows versions (7,8,10):


UAC Disabled You see per-user COM classes
UAC Enabled Not Elevated You see per-user COM classes
UAC Enabled Elevated You do not see per-user COM classes


Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 06 Jun, 2017 09:43:38 Top
Gutek Jakub




Posts: 8
Joined: 2017-06-06
ok, thanks i think this link is helpful:

https://www.add-in-express.com/creating-addins-blog/2011/02/22/deploying-permachine-office-extensions-msi-installer/

basically information that RegisterForAllUsers is in add in props not setup pros :)

thanks!
Posted 06 Jun, 2017 10:13:40 Top
Andrei Smolin


Add-in Express team


Posts: 14129
Joined: 2006-05-11
Jakub,

I urge you to check the manual; it contains the latest version of that blog!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 06 Jun, 2017 10:19:07 Top