Administrative Access

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

Administrative Access
 
Subscribe
Siddharth Rout




Posts: 5
Joined: 2020-03-26
Hi

I created a setup file and ensured that InstallAllUsers = False

When the Add-in setup is installed without running it as Administratior, the code in the workbook open event fails. If I run it as an Administrator then the Add-in works just fine.

Here is the error message

Exception Type:        System.NullReferenceException
Exception Message:     Object reference not set to an instance of an object.
Exception Target Site: AdxExcelAppEvents1_WorkbookOpen

---- Stack Trace ----
   EBMOfficeBridge.AddinModule.AdxExcelAppEvents1_WorkbookOpen(sender As Object, hostObj As Object)
       EBM Office Bridge.DLL: N 0062 (0x3E) IL 
   AddinExpress.MSO.ADXExcelAppEvents.DoWorkbookOpen(workbook As Object)
       EBM Office Bridge.DLL: N 0018 (0x12) IL 


How do I get my add-in to run without administrative access?

Regards

Sid
Regards

Siddharth Rout
Founder
XPIZON

[Skype]: XPIZON, [Email]: srout@xpizon.com, [Website]: www.SiddharthRout.Com; www.xpizon.com
Posted 26 Mar, 2020 15:48:40 Top
Andrei Smolin


Add-in Express team


Posts: 16999
Joined: 2006-05-11
Hello Sid,

A newly created add-in project doesn't require administrative permissions. Make sure you follow the instruction provided in section Deploying a per-user Office extension via an MSI installer; see the PDF file in the folder {Add-in Express}\Docs on your development PC.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Mar, 2020 01:39:49 Top
Siddharth Rout




Posts: 5
Joined: 2020-03-26
Hello Andrei

Yes I went through the pdf file. Here is what I did. Let me know if you spot something incorrect.

1. Started Visual Studio with Administrative Right (because point 3 below needs that access)
2. Created my Add-in
3. Registered my Add-In
4. Ran it from VS to check if it works
5. Unregistered my add-In
6. Right Click on my project. Add-in Express | Create Set Up Project
7. Build my project
8. Build my Setup

Thanks again

Sid
Regards

Siddharth Rout
Founder
XPIZON

[Skype]: XPIZON, [Email]: srout@xpizon.com, [Website]: www.SiddharthRout.Com; www.xpizon.com
Posted 27 Mar, 2020 02:12:42 Top
Andrei Smolin


Add-in Express team


Posts: 16999
Joined: 2006-05-11
Hello Sid,

It's okay. Does the installer work?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Mar, 2020 02:15:01 Top
Siddharth Rout




Posts: 5
Joined: 2020-03-26
Oh yes it works. If I run the installer as an Admin then the
AdxExcelAppEvents1_WorkbookOpen
fires correctly and there is no error.

If I directly install the Add-in without any admin access, then the above code gives the error message which I shared in my 1st post
Regards

Siddharth Rout
Founder
XPIZON

[Skype]: XPIZON, [Email]: srout@xpizon.com, [Website]: www.SiddharthRout.Com; www.xpizon.com
Posted 27 Mar, 2020 02:21:07 Top
Andrei Smolin


Add-in Express team


Posts: 16999
Joined: 2006-05-11
Sid,

You shouldn't start the installer of a per-user add-in via the Run As Administrator option.

Can it be that you changed the RegisterForAllUsers property and registered the add-in? If yes, uninstall the add-in, unregister it from the Visual Studio IDE, revert the RegisterForAllUsers property and unregister the add-in once again.

Does the issue persist if you create a new empty add-in project, drop an Excel Events component onto the add-in module and handle the AdxExcelAppEvents1_WorkbookOpen event to show a message box?

If yes, please reinstall the test add-in as user, start Excel and send me 1)adxloader.log and adxregistrator.log files; see {user profile}\AppData\Local\Temp\<ProductName>\ and 2) the complete project folder (with the installer). Find the support email address in {Add-in Express installation folder}\readme.txt. Make sure your email contains a link to this topic.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Mar, 2020 02:38:20 Top
Siddharth Rout




Posts: 5
Joined: 2020-03-26
Let me try it and get back to you once my client calls are over. Thanks for staying with me on this Andrie.
Regards

Siddharth Rout
Founder
XPIZON

[Skype]: XPIZON, [Email]: srout@xpizon.com, [Website]: www.SiddharthRout.Com; www.xpizon.com
Posted 27 Mar, 2020 02:58:15 Top
Siddharth Rout




Posts: 5
Joined: 2020-03-26
Thank you that helped Andrei.

My default setting is that VS starts with Admin Rights. I removed that and ran VS without Admin Rights. I then rebuild the project and the project setup. It seems to be working fine now. I have sent the setup to my client for testing. Will wait for the client feedback. But I guess it should be sorted now.

Will get back if there is an issue.

Thanks again for your help. :)
Regards

Siddharth Rout
Founder
XPIZON

[Skype]: XPIZON, [Email]: srout@xpizon.com, [Website]: www.SiddharthRout.Com; www.xpizon.com
Posted 27 Mar, 2020 05:24:30 Top
Andrei Smolin


Add-in Express team


Posts: 16999
Joined: 2006-05-11
Hello Sid,

Starting Visual Studio via the the Run As Administrator option is recommended if you need to debug the add-in.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Mar, 2020 06:13:00 Top