Where should VSTO-developed extensions be installed? - excel

I am building an extension ribbon for Excel. Besides the ribbon DLL I will have a data access DLL and a .sdf (SQL CE database file). In which directories should they be installed? Is there a best practice for deploying this project? It will be used at several sites around the country.

Generally, I install vsto addins just like any other addin or application. I have the installer create a \program files\MyCompany\MyApp folder, put the dlls, and the addin's Manifest and config files right there. Maybe create a few subfolders to store other info. then Register the addin and point to that location.

Related

Installation of VSTO by adding registry in end user computers

I've developed a VSTO addin for excel with VS2019. In my company execution of exe files are controlled by privilege management software (https://www.beyondtrust.com). For this reason, I don’t want to crate window installation file or setup.exe file. For this reason, I am traying to install VSTO by adding registry. My steps are as follow,
I have run VSTO addin from VS2019.
I have copy all registry from
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Excel\Addins
HKEY_CURRENT_USER\SOFTWARE\Microsoft\VSTO\Security\Inclusion
HKEY_CURRENT_USER\SOFTWARE\Microsoft\VSTO\SolutionMetadata
Deleted all above-mentioned registry.
Moved all files (dll, manifest, VSTO etc) generated by VS2019 in new folder.
Re added all registry with old GUID and RSA key but only modification of path for new path of VSTO files.
After that whenever I launch excel, my addin do not load and load behaver changed from 3 to 2. No matter even I change to 3, it got changed as 2. It always shown me my addin in inactive addin my option of excel.
Can anyone guide me?
Thanks
Best way is to create COM-AddIn using IExtensibility instead of VSTO addin.
It is similar to VSTO. Only change is u need to do everything by yourself including
user/machine registry

How to pack code and folder become a installer

I creating an windows forms application to configure IIS website application and also copy folder to selected location by user using visual c# 2010 express.
I want to pack the folder and application to become an executable file, like installer.
I can't find the setup template in Visual C# 2010 express.
Is there any way to pack the folder and the application to become an executable file?
One of the method that i found is use winrar. It can pack files/folder that the application needed to run into an executable file.

How to create ProgramData folder with InstallShield?

Using InstallShield LE with Visual Studio 2013, dev and target machines are Windows 7.
How do I create a folder under ProgramData and place a file in it? I have a text configuration file that I need to put there so the user can edit it as needed.
[I know this isn't a forum for ranting, so use your imagination to insert some nasty non-family-friendly comments about InstallShield here.]
InstallShield is a Windows Installer authoring tool. InstallShield rants aside, let's talk about the Windows Installer pain of what you are trying to do.
Installing per-user components is a pain. It requires a repair in each user context to populate the file. It's very ugly and has issues such as source resolution.
There is an easier way. Install a "seed" of the file in [ProgramFiles]Company\Product or [CommmonAppData]Company\Product and when the user runs your program copy the file to the users ProgramData if it does not exist.
This way you keep it simple for the installer, only add a few lines of code to your startup and don't have to worry about MSI trying to "fix" the user config file when the user edits the content because the installer doesn't know anything about it.
Easy, heh? Application design and Installer design have to go hand in hand.

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