Add-ins cannot load in Windows 7 - deployment

I got a problem that my add-in not work in Win7, due to the add-ins is a policy program in company, so it's required to be install for all users and run every start-up.
In WinXP era, the add-in work using SetSecurity library by installer but it's not work in Win7 now, I have tried to re-create a deployment package of installer but it still unable to load.
I tried ClickOnce is work but if the program hasn't been install, it will prompt for ask install, due to the add-in is policy program which is required to run everytime, so it's not allow user to skip install.
I tried use microsoft add-ins example but tested it will prompt for ask install too.
Could anyone can help please?
Thanks.

Solved by apply hotfix in KB976477 Office 2007 with EnableLocalMachineVSTO registry setting.
Reference: http://support.microsoft.com/kb/976811

Related

Microsoft word add in error VSTO

We have a Microsoft word add-in that is working fine on the majority of pc's.
On a particular windows 7 pc, it has the visual studio 2010 tools for office installed correctly.
But when a user creates a new template word document, they get teh following error:
The customization assembly could not be found or could not be loaded.
You can still edit and save the document. Contact your administrator
or the author of this document for further assistance.
We have tried unloading all dependencies but still does not make any difference.
This is an issue effecting a small amount of windows 7 pc's with office 2016 installed. It seems to be pc related rather than the application.
Usually, the reason behind such an error is that the permissions for loading the VSTO solution are missing. One thing that often gets "missed" when deploying VSTO solutions is that the document must be in a "trusted location". You might want to check that this is the case by looking in the Word "Trust Center" (in the Options). You also need to be sure you've installed the correct version of the VSTO run-time for the version of Windows and Office. Read more about that in the Troubleshooting Run Time Errors in Office Solutions article.
Also it may indicate that you didn't include all required dependencies to your add-in's installer (any platform-specific assemblies). Something is missing on the target machines, so I'd suggest looking for any difference between machines. You can add the .NET Framework, the Visual Studio Tools for Office runtime, and the Office primary interop assemblies to your Setup package as prerequisites that are deployed with your Office solution. For information about how to install the primary interop assemblies, see Configuring a Computer to Develop Office Solutions and How to: Install Office Primary Interop Assemblies.
The required steps for deploying Office solutions are described in the following articles:
Deploying an Office Solution by Using ClickOnce
Deploying an Office Solution by Using Windows Installer
You can use the event viewer in Windows to see error messages that are captured by the Visual Studio Tools for Office runtime when you install or uninstall Office solutions. You can use these messages from the event logger to resolve installation and deployment problems. For more information, see Event Logging for Office Solutions.
See Troubleshooting Office Solution Deployment for more information.

Creating an MSI with Installshield

I have followed the following guide to try and create an MSI to deploy a VSTO add in for Outlook. https://msdn.microsoft.com/en-us/library/cc442767.aspx?f=255&MSPPError=-2147217396
I have carefully followed this guide on two occasions, ensuring in particular that I placed the registry keys in every place I can imagine they would be need to be in order to be detected.
The MSI is created successfully and installs successfully also, the problem is that when I run Outlook after the MSI is installed, Outlook does not recognize the Add In and load it.
If I use Click once to install the add in it is recognized by outlook without any issue. The problem with that is that we want to install the application silently using SCCM and clickonce cannot be deployed silently.
What could possibly be going wrong?
The issue in this case, was that the guides code for installing the prerequisite "Visual Studio 2010 Tools for Office Runtime" did not work properly and the prerequisite was not installed.
Any user that needs to run the add in will need the VSTO tools from this link installed
https://www.microsoft.com/en-GB/download/details.aspx?id=48217
Hopefully this will be of some help to anyone else
EDIT: For anyone in the UK - The registry entry "LoadBehavior" must be spelled exactly as it appears here. I used the UK spelling "LoadBehaviour" and it was the sole reason my install was not successful. I was held back for several days due to this.

How do you disable storing install directory in Windows Registry for install4j?

Install4J stores a registry entry under HKEY_LOCAL_MACHINE\SOFTWARE\ej-technologies\allinstdirs* in windows when running an installer. Presumably it does something similar on Linux and MAC.
Is there a way to prevent this, and all other other permanent OS parameters, with a command line option? We run integration tests that actually run the installer and run then the application, but this then pollutes our registries, getting in the way of doing manual installations of the same application on our development machines.
As of 6.1, there no way to prevent this. I have added this to our issue tracker.

Upgrade ClickOnce Application using Windows Installer. Is this possible?

Few machines have 'MyApp.exe' installed using ClickOnce. And I have created a new MSI Windows Installer for 'MyApp.exe' using MS Visual Studio 2013 Setup and Deployment. I have a requirement that when my new MSI Installer runs it has to automatically remove/uninstall all previous 'MyApp.exe' (installed using ClickOnce) and install the new exe. Installer has to do it as part of its installation process.
Is this even possible? ClickOnce doesn't make any registry entries, so how can I get the Upgrade codes/Product codes which I can feed to Windows Installed 'Upgrade Paths' to upgrade it. ClickOnce is per user installation, but Windows Installer is not.
Is it even possible for Windows Installer to uninstall ClickOnce installed application ?
Any help is greatly appreciated. Thanks
ClickOnce is a per-user deployment experience and MSI is usually a per-machine experience. Per machine can't clean up other people's profiles. The only way I know is to do an active setup trick to run a program for each user who logs on and then execute a script to do cleanup. Either that or put first-run code in the applicaton itself to do the same.

WIX Office installer not uninstalling Plugin

I have created a WIX Install MSI file for my Office Outlook Plugin. Everything runs fine however when i uninstall it through add/remove programs everything is removed except for the Plugin in Outlook. It runs but gives errors because the other components are now missing. How can I get it to remove it without going to Outlook and removing the plugin manually?
I have added the "RemoveFolder" tag in the XML which has no effect.
I'm guessing that you are doing some kind of active setup trick to do HKEY_CURRENT_USER registry propogation. I'd suggest not doing this and instead register the extension in HKEY_LOCAL_MACHINE. This way when the uninstall runs it can access all of the components that need to be removed. There are gotchas in terms of different patch versions of different versions of office and how they behave in terms of supporting per-machine registration of AddIns. Details can be found in blog articles that I've written over the years titled VSTO lessons learned.