Does installing VSTO addin with ClickOnce edit the registry? - excel

I currently have a VSTO Excel addin which is installed via Installshield but was looking at using the ClickOnce installer (on the publishing tab) instead.
I've tested building it through ClickOnce and it does load in Excel. I'm slightly confused however as I have not specified the registry keys in order for excel to load the add in.
Is ClickOnce editing the registry or is it using a different mechanism to load the addin?
Secondly, does installing an add in via ClickOnce require admin privileges?

No ClickOnce does not require admin rights. HOWEVER, if you specify a dependency in your setup program such as .NET framework or Visual Studio Tools for Office, then the ClickOnce program WILL prompt for admin credentials to install those prerequisite components if they are not already installed. Also, if you need to install for all users on the computer, then I'm pretty sure ClickOnce won't be able to do that since installing for all users requires writing the HKLM registry, which is a privileged operation.

Related

clickonce auto update issue

I have an excel vsto add-in. I am distributing this add-in by sharing the clickonce installer file. Later, I tried to make this application auto update. for auto updating my application, I created a c# console application, which
downloads the latest clickonce installer
closes the excel
uninstalls previous version of addin
opens the clickonce installer
the first 3 steps are working fine.
for the fourth step I used Porcess.start('file_location to clickonce setup.exe)
if the user account is admin, there would be no problem, otherwise it would ask for admin password, if the admin password is given, the addin gets installed in the admin account and not in the user account.
I am struggling to actually understand how to auto update vsto addins if clickonce is used and distributed manually.
I think you may have misunderstood how ClickOnce is intended to be used with VSTO.
Basically all you have to do is deploy your addin using ClickOnce see
here which it sounds like you're already doing and then under Project Properties - Publish look for:
Install Settings - Updates - Set to your update interval (e.g. every time the customization runs)
This will then cause your VSTO addin to update automatically every time Excel starts (or based on your interval). There's no need to manually fire off the installer, close Excel, etc. it's all handled by ClickOnce.
That being said, according to this and that MSDN link, ClickOnce is not suitable for multiple users, but I assume that your use case is to have the same user both install and use the Addin.

VSTO Addin Creates 2 items in Add/Remove programs

I have created a vsto addin in VS2012. I have added an installation project to the solution using Installsheild LE. After installing the exe that I get, I get the expected item added to my add/remove programs. However when I open Word, I get prompted with a Microsoft Office Customization Installer prompt which says the publisher is unknown. I click OK to this and it adds my addin as expected, which all works fine but I also get a second item appear in my add/remove programs.
Can anyone tell me why I am getting the second item in add/remove programs and offer any advice about what I should do to avoid this?
You have to add "|vstolocal" to the addin registry value that points to your addin file. This tells ClickOnce to run it directly and not install it per-user.
You also want to digitally sign the addin using a certificate issued by someone in the users trusted root. This could be VeriSign or others. If you create your own certificate you have to use custom actions to install the root certificate in the certificate store and to register the publisher cert as a trusted publisher.
I've created about a dozen of these installers over the last 8 years and it's tricky at first but gets easier over time. Several of my customers are using InstallShield LE to get the prereqs installed but then I factor all the components out into a WiX merge module where I can use things like the Util extension to install certificates.
It looks like you use ClickOnce and MSI installers to deploy the add-in. You need to remove any of them. Both kind of installers are described in the following articles in MSDN:
Deploying an Office Solution by Using ClickOnce
Deploying an Office Solution by Using Windows Installer
Is that your dev machine and got Visual Studio in it? I have seen this happened with Windows 7 during development the addin is added in to add/remove programs. This has gone later when I updated my Windows 7 machine. Some updates from Microsoft has removed this later.

How to disable UAC programmatically to install a program by LE installshield for all users

I have an installation setup created by LE instalshield under VS2012. This setup.exe installs the application, registers some DLLs and activeX files and adds some registry entries as pointers to the location of an SQL server database. This application is to be run by all the users in a group policy created by the IT of their institution. The installation is done under the full administration privileges.
If the UAC of the win 7 is not fully lowered, some DLLs and OCXs are not registered (although the required registry keys are written in the MACHINE area of the registry without any problem!). So in order to avoid this I have to manually lower the UAC to its lowest level before running the Setup.exe. This solves the problem with the registration of DLLs.
But sometimes even though the installed program works for the installed login, it does not work for other logins within the same group/users. So how can I create a setup.exe under LEinstallshield that would 1) not require manual lowering of UAC, 2) install for all users under the same group policy?
Thank you for all your help.
You should be asking why your installer isn't compatible with UAC instead of asking how to disable UAC. If you are authoring a clean MSI using the registry tables (COM extraction) instead of using COM self-reg or other custom actions, it should just work.

Does Excel Add-In VSTO 2005SE Need Manifest Files?

We developed application level Excel Add-In in Visual Studio 2005 using VSTO 2005SE. The add-in installs and works fine on Excel 2003, 2007 and 2010 (32-bit) on the most of computers. However, in some cases Excel does not load it, despite the fact the registry LoadBehaviour (LB) value is set to 3 during the installation. When the user un-installs the add-in the LB is still set to 3, so I assume there is no error happens during initialization and loading, otherwise LB will be 2 or even 1.
We use MSI installation and deploy the add-in on application level with Local Machine registry keys.
When we build the add-in in Visual Studio 2005 there is no manifest files generated, so we don’t include these files in our MSI installation and there is no registry key entry for the manifest. So, we assumed the manifest is not essential part.
Even more, according to http://msdn.microsoft.com/en-us/a3swb498(v=vs.80) the application manifest provides information that is used by an Office solution to locate and update its assemblies. Since we have only one assembly that is a solution, we don’t need any manifest.
Our MSI file, add-in assembly and setup.exe files are signed with the COMODO certificate.
Does anyone know if we need an application and deployment manifests and if so how can we generate ones?

Deploying Com Interop into sharepoint server

I have a com interop dll (zkemkeeper.dll) that i have to register and use, i wonder how can i deploy that to the SharePoint server using SharePoint package?
You cannot deploy COM or COM Interop DLL to SP farm by SP solution. You need to install the component on every SP server in the farm by other means.
Create an MSI installer to be executed on every machine. MSI can be rolled out automatically too.
Provide a PowerShell script to be executed on every machine. PowerShell can be run remotely too.
Deploy a timer job with your solution that would be executed after the installation automatically or manually and would write to the registry the necessary COM stuff.
The first two options are my favourite because they shouldn't cause technical problems at the customer. The third one appears to promise installation without visiting every machine but the Timer Service user identity would need permission to write to the local registry which may not always be granted; and you'd have to resort to 1. or 2. anyway.
You should think about switching over to ASP.NET or .NET components on the long term. There are many components available in pure .NET that can be deployed by SP solutions. You can also consider pure HTML/JavaScript controls. I would probably go for the option 1. and invest the saved time to other architecture without the COM Interop.
--- Ferda
If you are using Sharepoint 2010, see How to: Add and Remove Additional Assemblies.
See also:
Deploying custom dll's in SharePoint 2010
Visual Studio - SharePoint 2010 - Include Assembly > Quick Question
Include 3rd party dll in the Sharepoint project while packaging the wsp
visual studio does not copy assembly into gac
How to install a WSP that has dependant assemblies?
Interop.zkemkeeper.dll regsvr32 error or InitializeComponent
Then you need done the step following:
Go to the website: http://www.zktechnology.com
Download ->Software Download->ZK Access for C3 panels
Extract files
Install
Open visual studio -> Solution Project->references-> Add Interop.zkemkeeper.dll
Good luck

Resources