Quantcast

WiX3.6 Heat cannot generate RegistryValue, Class, TypeLib, etc. for VB6 DLLs

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

WiX3.6 Heat cannot generate RegistryValue, Class, TypeLib, etc. for VB6 DLLs

Gino
This post has NOT been accepted by the mailing list yet.
Hello,

I want to register all VB6 DLLs / OCXs, learned from some of topics that heat.exe can help me harvest all required DLLs and generate the RegistryValue, Class, TypeLib for registering each dll / ocx.  

But no matter what I tried to do with -svb6, -vb6 options by heat.exe, always failed.
My generated result is like:

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Fragment>
        <DirectoryRef Id="TARGETDIR">
            <Component Id="project1.dll" Guid="{D65DE908-B8EA-4F56-B234-17D8D7DC554E}">
                <File Id="project1.dll" KeyPath="yes" Source="$(var.SourcePackageDir)\project1.dll" />
            </Component>
        </DirectoryRef>
    </Fragment>
</Wix>


From other topics, the user can get much more necessary information, such as:

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Fragment>
        <DirectoryRef Id="TARGETDIR">
            <Directory Id="dirAD70B10292EAB7CAC7171859FBB23AA9" Name="vbdll" />
        </DirectoryRef>
    </Fragment>
    <Fragment>
        <DirectoryRef Id="dirAD70B10292EAB7CAC7171859FBB23AA9">
            <Component Id="cmp9D818C62A6239E8B51E971A0048D0C05" Guid="PUT-GUID-HERE">
                <File Id="filDD6F51EC5018EF4A9A312FFA6AC4257D" KeyPath="yes" Source="SourceDir\vbdll\act.dll">
                    <TypeLib Id="{80D8DA04-72C9-4D36-B269-57D989187ACF}" Description="act" HelpDirectory="dirAD70B10292EAB7CAC7171859FBB23AA9" Language="0" MajorVersion="1" MinorVersion="0">
                        <Class Id="{31BD65B6-9479-40EB-83C0-E717CD4793DD}" Context="InprocServer32" Description="act.def" ThreadingModel="apartment" Version="1.0" Programmable="yes">
                            <ProgId Id="act.def" Description="act.def" />
                        </Class>
                        <Interface Id="{C6D46026-CD7E-4AB0-B3B6-810FBF435BEF}" Name="def" ProxyStubClassId="{00020424-0000-0000-C000-000000000046}" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                    </TypeLib>
                </File>
                <RegistryValue Root="HKCR" Key="CLSID\{31BD65B6-9479-40EB-83C0-E717CD4793DD}\Implemented Categories\{40FC6ED5-2438-11CF-A3DB-080036F12502}" Value="" Type="string" Action="write" />
            </Component>
        </DirectoryRef>
    </Fragment>
</Wix>

This sample gets from http://stackoverflow.com/questions/1379930/wix-3-using-heat-for-visual-basic-6-com-dlls


Although I find another way to Register VB DLLs / OCXs - Custom Action, most of experts on WiX said that "Custom Action" and "SelfReg" are not recommended which may bring you very strange results.

Then, another expert said that "SelfReg is evil. Run heat against your .dll and it will try to extract the
registry keys. If it can't for some reason (usually because your .dll has difficult dependencies) then you can write the Class, ProgId, TypeLib registration by hand." from http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/self-registration-of-COM-dlls-td5769715.html

I don't want to add a lot of things (Class, ProgId, TypeLib) by myself, so is there any better suggestion to help me achieve my target?? Why Heat does not work for me?

Thanks in advance
Loading...