Hi (David, I guess) and thanks for reply.

I know how to check and install prerequisites (VSTO + Framework) and I do it in 
my bundle.
I use VS2010 and WIX3.8 and I have project template called "Bootstrapper 
project" and I use it to install:
        1 My Winforms and Console applications (For real users and automation)
        2 Prerequisites, such as Framework, VSTO etc.
        3 Excel add-in that interacts with my Winforms and Console applications

The WIX code you have provided is very familiar to me (I am in my trouble 
already two weeks, it is as comfortable as my shoes already....)
This code is good for simple Excel add-in, it works. But not in my case. My 
add-in creates COM-visible types that are defined in external to add-in dll. 
And add-in shares those objects with my applications. And as I stated in 
initial mail, most likely I have a problem with registering those COM-visible 
types.

Regards,
Artem

-----Original Message-----
From: darbid [mailto:davidbo...@gmx.de] 
Sent: Sunday, March 16, 2014 10:44
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] R: How to install VSTO Excel add-in that use dll with 
COM-visible objects?

Hi

I am a beginner and unlike Objective C / C# / Microsoft topics and anything 
else I have tried to learn I find the Wix stuff impossible I even have read 
part of the Wix book and still cannot get things right.  I do however think 
that the whole windows installer stuff is somehow strange and old.  Anyway I 
have just done something like what you are doing and either I can help you 
cause I am doing it the right way or I will learn IF someone corrects it.

First you will need 2 Wix "things" The first is your msi to install your new 
Excel Addin.  This alone is enough if you don't want or need to have the 
installer also install VSTO or any other package.  If however you want to check 
if for example .Net 4 or VSTO is installed and then if it is not installed, 
install it then you need to create a Bootstrapper using Wix Burn. 
I will show you that as well.

So here is an example of the MSI.  I have deleted names so there might be a few 
errors in it now, but you can get the idea of what is happening.  Cut and copy 
it into your project and you should be able to see it properly.  In short this 
is adding the Minimum no of files you need to the package and then putting them 
on to the Users computer and then making the required registry entries.  Note I 
am not registering any COM stuff here which you still have to work out.

***************************************
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
        <Product Id="*" 
                         Name="addyourAppName" 
                         Language="1033"
                         Codepage="1252"
                         Version="2.0.1.0" 
                         Manufacturer="yourname" 
                         UpgradeCode="9655f7ee-3baf-4a53-b571-f94af4a8d2d2"
                         >

                <Package InstallerVersion="200" 
                                 Compressed="yes" 
                                 InstallScope="perMachine"/>

                <MajorUpgrade DowngradeErrorMessage="A newer version of 
Yourappname is already installed." 
                                          AllowDowngrades="no"/>
                
                <MediaTemplate EmbedCab="yes"/>

                <Feature Id="ProductFeature" Title="iYourAppForExcel" Level="1">
                        <ComponentGroupRef Id="YourAppForExcelComponents" />
                        <ComponentGroupRef Id="ExcelRegistryComponents" />
                </Feature>
                
                
                <Icon Id="YourAppForExcelIcon.exe" 
SourceFile="YourAppForExcelIcon.ico"/>
                <Property Id="ARPPRODUCTICON" Value="YourAppForExcelIcon.exe" />
                

                <Property Id="ARPNOREPAIR" Value="no" />
                <Property Id="ARPCONTACT" Value="David Bowen" />
                <Property Id="ARPHELPTELEPHONE" Value="+49 (0)89 636 40833" />
                <Property Id="ARPNOMODIFY" Value="yes" />
                <Property Id="ARPHELPLINK"
Value="mailto:bowen.da...@siemens.com?Subject=YourAppForExcel%20Help"; />
                

        </Product>

        <Fragment>
                <Directory Id="TARGETDIR" Name="SourceDir">
                        <Directory Id="ProgramFilesFolder">
                                <Directory Id="INSTALLFOLDER" 
Name="YourAppAddIns" >
                                        <Directory Id="YourAppFOREXCEL" 
Name="YourAppForExcel" />
                                </Directory>
                        </Directory>
                </Directory>
        </Fragment>

        <Fragment>
                
                <ComponentGroup Id="YourAppForExcelComponents"
Directory="YourAppFOREXCEL">
                        
                        <Component Id="com_YourAppForExcel.dll"
Guid="{CC76C440-4C5B-4059-A37F-B77B925C2F76}">
                                <File Id="file_YourAppForExcel.dll" 
Name="YourAppForExcel.dll"
Source="..\..\YourAppForExcel\FilesForWix\YourAppForExcel.dll"
KeyPath="yes"/>
                        </Component>

                        
                        <Component Id="com_YourAppForExcel.dll.manifest"
Guid="{9DBCFC5B-0287-4B28-A91E-5F151DB2BE02}">
                                <File Id="file_YourAppForExcel.dll.manifest"
Name="YourAppForExcel.dll.manifest"
Source="..\..\YourAppForExcel\FilesForWix\YourAppForExcel.dll.manifest"
KeyPath="yes"/>
                        </Component>

                        
                        <Component Id="com_YourAppForExcel.vsto"
Guid="{993D6F46-1EF4-4542-8196-8383E4401A7C}">
                                <File Id="file_YourAppForExcel.vsto" 
Name="YourAppForExcel.vsto"
Source="..\..\YourAppForExcel\FilesForWix\YourAppForExcel.vsto"
KeyPath="yes"/>
                        </Component>

                        
                        <Component Id="com_ExcelAddInHelper.dll"
Guid="{150DEA4E-4637-4D58-9D5A-02290CD9092A}">
                                <File Id="file_ExcelAddInHelper.dll" 
Name="ExcelAddInHelper.dll"
Source="..\..\YourAppForExcel\FilesForWix\ExcelAddInHelper.dll"
KeyPath="yes"/>
                        </Component>

                        
                        <Component
Id="com_Microsoft.Office.Tools.Common.v4.0.Utilities.dll_Excel"
Guid="{32365055-C86E-46CB-8B98-D354AEB0ECEF}">
                                <File 
Id="file_Microsoft.Office.Tools.Common.v4.0.Utilities.dll_Excel"
Name="Microsoft.Office.Tools.Common.v4.0.Utilities.dll"
                                         
Source="..\..\YourAppForExcel\FilesForWix\Microsoft.Office.Tools.Common.v4.0.Utilities.dll"
KeyPath="yes"/>
                        </Component>
                </ComponentGroup>

                
                <ComponentGroup Id="ExcelRegistryComponents" 
Directory="INSTALLFOLDER">
                        <Component Id="com_ExcelRegistry"
Guid="{5081ACD3-5BA5-4975-864C-6728DF5822A3}">
                                <RegistryKey Root="HKCU"
Key="Software\Microsoft\Office\Excel\Addins\YourAppForExcel">
                                        <RegistryValue Name="Description" 
Value="YourApp Excel Addin"
Type="string" />
                                        <RegistryValue Name="FriendlyName" 
Value="YourApp Excel Addin"
Type="string" />
                                        <RegistryValue Name="LoadBehavior" 
Value="3" Type="integer" />
                                        <RegistryValue Name="Manifest"
Value="[YourAppFOREXCEL]YourAppForExcel.vsto|vstolocal" Type="string"
Action="write" />
                                </RegistryKey>
                        </Component>
                </ComponentGroup> 
    
        </Fragment>
</Wix>

*****************************************

Now once your MSI is working and you can for example install this alone and it 
works then you can move on to packaging this.

You need to make a bootrapper.  This you will see only does two things - 1 
checks if VSTO is present and if not downloads it from Microsoft.  Note you 
could inlcude the VSTO redistributable in the package if you want.  Then it 
adds your MSI.

****************************************
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension";
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension";>

  <Bundle Name="YourAppForExcel"
                        Version="2.0.1.0"
                        Manufacturer="myname"
                        UpgradeCode="a37e1142-86b4-49ff-a9ee-ea82276bb28e"
                        HelpTelephone="my phone number"
                        HelpUrl="mailto:myemail";
                        DisableModify="yes"
                        IconSourceFile="../../YourAppForExcelIcon.ico"
                        >

    <BootstrapperApplicationRef
Id="WixStandardBootstrapperApplication.HyperlinkLicense">
      

    
    </BootstrapperApplicationRef>

    <WixVariable Id="WixStdbaLicenseUrl" Value=""/>
    <WixVariable Id="WixStdbaThemeXml" Value="../../HyperlinkTheme.xml"/>
    <WixVariable Id="WixStdbaThemeWxl" Value="../../HyperlinkTheme.wxl"/>
    <WixVariable Id="WixStdbaLogo" Value="../../YourAppForExcelPng.png"/>
    

    <util:RegistrySearch Id="VSTORuntimeTest" Root="HKLM"
Key="SOFTWARE\Microsoft\VSTO Runtime Setup\v4R\" Value="VSTORFeature_CLR40"
Variable="VSTORFeature"/>
    <util:RegistrySearch Id="VSTORuntimeVersionV4R" Root="HKLM"
Key="SOFTWARE\Microsoft\VSTO Runtime Setup\v4R\" Value="Version"
Variable="VSTORVersionV4R"/>
    <util:RegistrySearch Id="VSTORuntimeVersionV4" Root="HKLM"
Key="SOFTWARE\Microsoft\VSTO Runtime Setup\v4R\" Value="Version"
Variable="VSTORVersionV4"/>

    <Chain>

      <ExePackage Id="VSTORuntime"
                                                Name="VSTOFILEEXE"
                                                Permanent="yes"
                                                Vital="yes"
                                                Cache="no"
                                                Compressed="no"
                   
DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=158917";
                    PerMachine="yes"
                    InstallCommand="/q /norestart"
                    DetectCondition="VSTORFeature"
                    InstallCondition="NOT VSTORFeature OR NOT (VSTORVersionV4R 
>=v10.0.40303) OR NOT (VSTORVersionV4 >=v10.0.21022)" >

        <RemotePayload Description="Microsoft Visual Studio Tools for Office 
Runtime 2010"
                                                           
ProductName="Microsoft Visual Studio Tools for Office Runtime 2010"
                                                           
Version="10.0.40820.0"
                                                           Size="40051808"
                   Hash="D40DB6440BD2B5B5AA00DA63F408469FF22A9542"/>
        

      </ExePackage>

      
      <MsiPackage Vital="yes"
SourceFile="../../../../iYourAppForExcel\iYourAppForExcel\bin\Debug\iYourAppForExcel.msi"
/>
    </Chain>
  </Bundle>

 

</Wix>



***************************************

Once again I have removed some personal information from this so there might be 
a few errors and also I am currently working on but have errors with 
customizing the UI of this so you will see some strange things in the above.

Like this bit - just remove it.
<WixVariable Id="WixStdbaLicenseUrl" Value=""/>
    <WixVariable Id="WixStdbaThemeXml" Value="../../HyperlinkTheme.xml"/>
    <WixVariable Id="WixStdbaThemeWxl" Value="../../HyperlinkTheme.wxl"/>
    <WixVariable Id="WixStdbaLogo" Value="../../YourAppForExcelPng.png"/>


Once again I am not registering any come visible stuff here but in a standard 
VSTO project with excel I am not sure what you have COM visible DLL anyway.








--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-install-VSTO-Excel-add-in-that-use-dll-with-COM-visible-objects-tp7593336p7593464.html
Sent from the wix-users mailing list archive at Nabble.com.


---------------------------------------------------------------------
A member of the Intel Corporation group of companies

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to