Question

Scenario I have created a .dll file for Internet Explorer 10 Plugin. Using regasm I register the .dll and works fine in IE10. I want to develop a .msi file so that i can distribute it. I am having several problems while developing it. During installation the dll files should be registered in the registry, but the files are never getting registered, but without the .msi file, if simply registering the .dll works well. The problem occurs when the .dll files are packaged into .msi file. I have gone through the Wix doc, there it is suggested to use heat toolset. Following was the output

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">


<Fragment>
    <DirectoryRef Id="TARGETDIR">
        <Directory Id="dirCFD54C07EFB094CAD317543172D62CC3" Name="bin" />
    </DirectoryRef>
</Fragment>
<Fragment>
    <DirectoryRef Id="dirCFD54C07EFB094CAD317543172D62CC3">
        <Component Id="cmpA742B1B0BA7235FA026C505929929E25" Guid="{A6A2DF10-0BC0-410d-    8582-79DA83A83F19}">
            <Class Id="{8A194578-81EA-4850-9911-13BA2D71EFBD}" Context="InprocServer32" Description="Greyhound.BHO.BHO" ThreadingModel="both" ForeignServer="mscoree.dll">
                <ProgId Id="Greyhound.BHO.BHO" Description="Greyhound.BHO.BHO" />
            </Class>
            <File Id="filB636C21F357A14C42DFD0FBC9300D2F4" KeyPath="yes" Source="SourceDir\bin\greyhound.dll" />
            <RegistryValue Root="HKCR" Key="CLSID\{8A194578-81EA-4850-9911-13BA2D71EFBD}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
            <RegistryValue Root="HKCR" Key="CLSID\{8A194578-81EA-4850-9911-13BA2D71EFBD}\InprocServer32\1.0.0.0" Name="Class" Value="Greyhound.BHO.BHO" Type="string" Action="write" />
            <RegistryValue Root="HKCR" Key="CLSID\{8A194578-81EA-4850-9911-13BA2D71EFBD}\InprocServer32\1.0.0.0" Name="Assembly" Value="Greyhound, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
            <RegistryValue Root="HKCR" Key="CLSID\{8A194578-81EA-4850-9911-13BA2D71EFBD}\InprocServer32\1.0.0.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
            <RegistryValue Root="HKCR" Key="CLSID\{8A194578-81EA-4850-9911-13BA2D71EFBD}\InprocServer32\1.0.0.0" Name="CodeBase" Value="file:///[#filB636C21F357A14C42DFD0FBC9300D2F4]" Type="string" Action="write" />
            <RegistryValue Root="HKCR" Key="CLSID\{8A194578-81EA-4850-9911-13BA2D71EFBD}\InprocServer32" Name="Class" Value="Greyhound.BHO.BHO" Type="string" Action="write" />
            <RegistryValue Root="HKCR" Key="CLSID\{8A194578-81EA-4850-9911-13BA2D71EFBD}\InprocServer32" Name="Assembly" Value="Greyhound, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
            <RegistryValue Root="HKCR" Key="CLSID\{8A194578-81EA-4850-9911-13BA2D71EFBD}\InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
            <RegistryValue Root="HKCR" Key="CLSID\{8A194578-81EA-4850-9911-13BA2D71EFBD}\InprocServer32" Name="CodeBase" Value="file:///[#filB636C21F357A14C42DFD0FBC9300D2F4]" Type="string" Action="write" />
            <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{8a194578-81ea-4850-9911-13ba2d71efbd}" Name="Alright" Value="1" Type="integer" Action="write" />
        </Component>
    </DirectoryRef>
</Fragment>

I am getting confused as to where should I include this output into my .wxs file.Even generating the above file , still the problem of registering the .dll exists.

If somebody can throw some light on it would be appreciated.Thank you

Was it helpful?

Solution

To include the generated output you only have to add a ComponentRef in your feature

<ComponentRef Id="cmpA742B1B0BA7235FA026C505929929E25" />

You have to specify both your .wxs files (the one containing your product and the generated file) in the candle command and then both generated .wixobj files in your light command.

Check this link for more Information about cross file references: http://wix.tramontana.co.hu/tutorial/upgrades-and-modularization/fragments

When harvesting multiple files consider using the "-cg ComponentGroupName" flag with heat. With that you can include all components at once

<ComponentGroupRef Id="ComponentGroupName" />

About the registry keys not getting created, there could be multiple reasons. Maybe the file greyhound.dll is already at the desired location. Windows will only look if the keypath of the component exists, if it does the whole component won't be installed.

Look into the logs in the AppData\Local\Temp folder for more information

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top