i created some new user defined functions for excel using excel dna add-in and when i add the add-in manually to excel it works, now i want to create an installer to deploy automatically this add-in into excel, i downloaded Advanced installer and created a new installer project, specify a name,version and Publisher in Product Details interface,in prerequisites i selected .Net Framework 4.5(web installer), in launch conditions/Software i selected Installed Office Application/ Microsoft Excel, in the files and folders i added my class library (.dll)/my xll file and my dna file, finally i choose theme =>build and run my project but when i excecute the setup generated when i run this project and try to test my functions from excel, i don't found them, the installer i created didn't add this add-in to excel, is there some missing steps please ?
You need to add a custom action to register the Add-in, for example:
On Error Resume Next
Dim oXL, oAddin
Set oXL = CreateObject("Excel.Application")
oXL.Workbooks.Add
Set oAddin = oXL.AddIns.Add(Session.property("CustomActionData") & "MyAddin.xll", False)
oAddin.Installed = True
oXL.Quit
Set oXL = Nothing
This article, as mentioned in Govert's answer, explains how to setup the custom actions:
https://jiripik.com/2017/02/25/use-advanced-installer-excel-dna-project/
I followed the steps in the article and have created a reliable installer for my Excel DNA based add-in, it works really well. The only issue is that you need to create 2 installers: one for 32 bit Excel and another for 64 bit Excel. Unfortunately I cannot find a reliable way of detecting which version of Excel is installed.
Hope this helps.
For an .xll Excel add-in (like those made with Excel-DNA) you need some registry entries that Office installer normally don't add. They're called OPEN, OPEN1, OPEN2 etc. under one of the Excel keys.
For Advanced Installer you can read a very detailed write-up here: https://jiripik.com/2017/02/25/use-advanced-installer-excel-dna-project/
Another alternative is to use the standard WiX toolkit to make your installer. For this you can start with the Excel-DNA WiXInstaller as a template project: https://github.com/Excel-DNA/WiXInstaller
It has a custom actions project to make the installer for those extra registry keys.
Advanced Installer provides a wizard for Office add-ins, as you can see in the video of the linked article.
This wizard configures some registry entries, according to MSDN docs, these registry are the way Office detects your addin. If you don't have them your installer is incomplete.
You need to create the project using that wizard, after which you can further customize all the project settings you specified in your question (product details, launch conditions, etc...)
Related
I need a recommendation for an installer.
I was using InstallShield but unfortunately it was a demo version that only allowed me to get a quick start.
Now I need to switch to an installer that is open source and allows to:
create environment variables on user's computer
add files to a giving path
create .exe (via Release Wizard in IstallShield)
I came across tools like NSIS but I am not sure it has the same features as InstallShield.
Please advice!
Thank you
You can use Wix tool. It is open source and it has most of the capability of Installshield. Only problem with WiX is there would be a learning curve of MSI technology and WiX itself.
I have a VSTO Add-in in C# for Excel in Visual Studio 2017.
I also have a manifest which references a Web Add-in for Excel.
I'd like to add the manifest to the VS project so that when the user installs the VSTO add-in, the web add-in will be installed as well.
I have found several ways to add a manifest to a VS project:
1. Create the manifest through New File -> Add Manifest Application File
2. Add a Web Add-in to a solution
However, these 2 ways aren't enough to achieve what I'm trying to do.
With the first method, the manifest is added to the project, but nothing reads it so it is never loaded.
Moreover, I thought I could specify it as an additional manifest, but VS doesn't let me embed it:
With the second method, I successfully added a Web add-in project to my solution.
When set as additional start up project, it loads and runs correctly on debug mode.
However, when I build my solution, the web add-in doesn't generate anything, so it isn't embeded in my installer (I'm using Wix 3.11 to generate a .msi installer), and thus, it is never run when I install the add-in.
How can I add and read the manifest in my solution so it will run upon installation?
EDIT:
I have also found this to use AdditionalManifestFile in (I believe) the .csproj of a project, however this doesn't work either.
I want to create an installer MSI that will unload and move files I need for my plugin into the user's application folder. In my case the application is Cinema 4D, but this detail does not matter. I need to unload a .cyc file and place it in a specific subfolder under the application folder. In addition to that, I need to add a line of code to a .res file another subfolder of the application.
I want my installer to look nice
I have already looked at WIX, NSIS, Advanced Installer and Microsoft Visual Studio as possible options but do not know how to do what I have to do. I've seen installers that do exactly this - so how do I do this?
Most of the tools mentioned above should be able to help you get the job done, except Visual Studio (its support for building setup packages is quite limited).
Here is a step by step article explaining how to do this with Advanced Installer. You can download a trial version of Advanced Installer from the website, during trial you can access all the features.
Disclaimer: I work on the team building Advanced Installer.
Is there a way to inject a custom registry setting during installation of Office plugins? Using Visual Studio 2013 and regular "publish" method that generates an .MSI file
You have 2 options for installing: Click Once and Windows Installer (.msi)
Are you sure Publish is creating an .MSI, because in a previous version of Visual Studio it makes a ClickOnce installer which is totally different from an .MSI.
Start here: http://msdn.microsoft.com/en-us/library/bb386179.aspx
I don't think the ClickOnce option gives you the ability to add your own registry settings. If you go the ClickOnce route then it would probably be easiest to add the registry setting in your addin code, assuming the registry location is something like HKCU that the user would have access to. If you need to write to HKLM hive then that requires admin privileges and you shouldn't try doing that from your addin, it will need to be added in a .MSI that runs with admin rights. You can use the InstallShield LE as mentioned in the article, or you could obtain the just released addin for Visual Studio that brings back the old Setup Project (http://blogs.msdn.com/b/visualstudio/archive/2014/04/17/visual-studio-installer-projects-extension.aspx)
Background:
I am working on a SDK that allows its users to create custom plugins for an existing product. There is a bit of boilerplate code/file copy/COM DLL registration required for the plugin integration.To ease things for the plugin developer, I have written a Visual Studio custom project template that uses a IWizard to create a new solution, add couple of projects, generate a number of files containing the boilerplate code as well as some batch files that get executed as a post build event.
The wizard has a number of fields (such as the copyright header that needs to be inserted at the top of each generated file) that the user can edit to customize the generated code.
The Question
I'd like to persist some of the customizations and use it across multiple runs of the wizard. I also know the usual recommended places for individual applications to store their settings is under %APPDATA%. I'd like to know if there are any other places where specifically Visual Studio extensions can store their settings or I should just treat this as an standalone application and go with the %APPDATA% folder. The reason I ask is further down the line, I like to allow the plugin developers to share these settings via VS->Tools->Import & Export Settings
You have two options. You can use Visual Studio's DialogPage which will show up your configurations in Visual Studio's Options window. You can also use IProfileManager, if you do not want your preferences to show in Options window but you still want to persist them.
I have written blog post about both of these options. These posts contains complete details and code snippets.
Integration with Visual Studio Options Window using custom controls
Persisting settings without using Options dialog in Visual Studio