RegisterforAllUsers = True does not work

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

RegisterforAllUsers = True does not work
 
Subscribe
Leon Lai Kan




Posts: 200
Joined: 2018-12-20
Hello, Andrei

For months, I have been struggling with the problem of add-in not being registered in Excel.

As you know, I have reinstalled Office 2016, Framework, and ADX many, many times.

As an act of despair, I have reformatted my computer, reinstalled Windows 10 (as 64-bit), reinstalled Office 2016 (as 32-bit), reinstalled .NET Framework 4, and reinstalled ADX. I also just installed Visual Studio 2019 Community Version.

I hope all my problems would be over. Technically, I have a brand new computer, virus-free, with all (original) programs freshly installed. So, ADX should work without any problem.

Today, I tried creating a new add-in: A very simple one - Just 1 Tab, 1 Group, and 1 Button.
Plus I added the template About box, with no modification.


-----
First, I set Register For All Users = False

I built, registered, and debug.

Works fine! The add-in is loaded in Excel.
When I click the button, the template About Box is displayed.

I even created a setup project. It works.

-----
Next, I UNREGISTERED the add-in.

I set Register For All Users = True

I repeated all my steps.

This time the add-in is NOT REGISTERED AND NOT LOADED IN EXCEL,
whether I register using Debug, or Setup File.


-----

If I uninstall and set Register for All Users to False, it works correctly again.


It's incredible that I am the only (?) person who is getting such a problem!


Andrei, please see with your developers what is going wrong!
I need to get started with my add-in, but I am plagued with this eternal problem.

I am willing to do anything you recommend, including buying a new computer (if necessary), to see ADX work on my computer at last, so that I can start developing my add-in.

What should I do???

Best Regards,
Leon


=====

ADDED

I wish to point out:
Sometimes, RegisterForAllUsers = True works for some simple add-ins, and does not work for other similar add-ins

Sometimes, it works, but after some installs and uninstalls, it stops working.

This makes the problem so difficult to understand.

I created 2 IDENTICAL simple add-ins: One called Test2_About, the other called Test3_About.
Both contain only 1 Tab, 1 Group, 1 Button, 1 (default) About Box.

Both add-ins work when RegisterForAllUsers = False.

But only Test3_About works when RegisterForAllUsers = True.

This is really very puzzling!
Posted 03 Jul, 2019 06:28:52 Top
Andrei Smolin


Add-in Express team


Posts: 16459
Joined: 2006-05-11
Hello Leon,

To create a per-user add-in, you must follow the instruction we give 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.

To create a per-machine add-in, you must follow the instruction we give in section Deploying a per-machine Office extension via an MSI installer, see the PDF file in the folder {Add-in Express}\Docs on your development PC.

When you run an Add-in Express installer, it creates a log file as explained in this citation from the Add-in Express manual:

The process of registration/unregistration is documented in a log file, the default location of which is {user profile}\AppData\Local\Temp\<ProductName>\adxregistrator.log; the ProductName part reflects the ProductName field of AssemblyInfo.cs (AssemblyInfo.vb). The adxregistrator.exe utility supports the /LogFileLocation switch that allows you to specify the path and file name of the log file. The log file will not be generated if you use /GenerateLogFile=false; omitting that switch means the file will be generated.

When the Office host application loads your add-in, the loader creates a log file:

If the manifest requires creating a log file (see the generateLogFile attribute at Add-in Express Loader Manifest), the log file (adxloader.log) is created in the location specified by the manifest or in {user profile}\AppData\Local\Temp\<ProductName>\adxloader.log; the ProductName part reflects the ProductName field of AssemblyInfo.cs (AssemblyInfo.vb).

To run an Add-in Express installer means to start setup.exe. In the per-machine installer case, this triggers the UAC warning immediately; an indication of something going wrong is the UAC warning triggered after the installer shows its window.

Try to use this info to identify and locate the cause of your issue.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 04 Jul, 2019 08:23:49 Top