Here's a pretty cool way to harness the Power of Microsoft's Excel (via WiseScript) to add a little extra 'kick' to your garden variety MSI. If you're having trouble including Excel Addins in your distribution packages, here's the secret sauce.
Let's start with a definition. What is an Excel Addin?
An Excel Add-In is a file (usually with an .xla or .xll extension) that Excel can load when it starts up.
There are two methods of adding the Excel Addins through MSI Package:
HKCU\Software\Microsoft\office\<version>\Excel\Options
The first method described here is pretty much straight forward, we can achieve it by placing the files in the Xlstart folder.
The problem with the second method is that when we do a setup capture of the application, Wise captures these Addin keys as OPEN, OPEN1, OPEN2 depending on the number of Excel Addins present. We cannot ship these keys as such using an MSI as it will replace the registry keys in the destination computer.
Solution: In order to overcome this issue, we need to write a WiseScript that will fetch the current OPEN keys and increment the OPEN key Number. If OPEN1, OPEN2 are already present in the box, then the script will install the Addin as OPEN3 and so on. This will avoid corrupting the existing Addins on the box.
This is a sample WiseScript designed to overcome this issue. The script accepts a value for the Addin using a variable called ADDIN.
Click to view.
I am missing the properties of each actions, the picture is fine.
The click to view link shows a better sized pic
https://www.symantec.com/connect/sites/default/files/u8484/Exceladdins.jpg
Hi,
Unfortunately the details of the WiseScript are not visible.
Could you provide a .wse or a notepad with the details?
Would be extremly helpful, thanks a lot.
Cheers
Dim oXLDim oAddinSet oXL = CreateObject("Excel.Application")oXL.Workbooks.AddSet oAddin = oXL.AddIns.Add("C:\xpaddin.xll", True)oAddin.Installed = TrueoXL.QuitSet oXL = Nothing
Dim oXLDim crAddinon error resume nextSet oXL = CreateObject("Excel.Application")for i = 1 to oXL.Addins.Count Set crAddin = oXL.Addins.item(i) If crAddin.Name = "xpaddin.xll" then crAddin.Installed = False End IfnextoXL.QuitSet oXL = Nothing