tags:

views:

27

answers:

1

I have basic issue that i don't understand, we use HEAT to consume directory of artifacts that part of them are COM DLL. As part of the crated WXS file i see that there are elements for registry like:

<Component Id="cmpAE50B39B8817E1840F09193686006FFA" Guid="*">
  <File Id="fil7BDB953AB6AAEC9E98E28F49D87BABA3" KeyPath="yes" Source="SourceDir\ucfDistribution.dll">
    <TypeLib Id="{88B7EEC8-DF2B-11D4-A508-005004ED3088}" Description="ucfDistribution" HelpDirectory="dir83BF4093F80DD11BB416BF39954702C2" Language="0" MajorVersion="14" MinorVersion="13">
      <Class Id="{3AA1580F-1DA2-44A5-B581-98D861C2A0CD}" Context="InprocServer32" Description="ucfDistribution.ucfCMAXMLClass" ThreadingModel="apartment" Version="14.13" Programmable="yes">
        <ProgId Id="ucfDistribution.ucfCMAXMLClass" Description="ucfDistribution.ucfCMAXMLClass" />
      </Class>
      <Interface Id="{A98DFC45-F161-442D-9A10-3CB3103B524F}" Name="ucfCMAXMLClass" ProxyStubClassId="{00020424-0000-0000-C000-000000000046}" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
    </TypeLib>
  </File>
  <RegistryValue Root="HKCR" Key="Interface\{D41A9260-ED8A-44BC-8700-08D3ADB20CFE}\Forward" Value="{A98DFC45-F161-442D-9A10-3CB3103B524F}" Type="string" Action="write" />
</Component>

Lets say that during patch the file is changed & registration is change in such way that the KEY of the registry changed (was originally Interface\{D41A9260-ED8A-44BC-8700-08D3ADB20CFE}\Forward)

What will happen during patch will the previous registry be removed or will it stay orphaned.

I suspect that since the component key (file) is updated this means that the component will install and will leave the previous key (registry) * i didn't test this yet

A: 

Correct. A patch is really just a transform applied to the MSI then the result is repaired. Since the transform will change the MSI, it won't know about the old registry keys and leave them untouched.

Your patch is breaking the Component Rules: http://robmensching.com/blog/posts/2003/10/18/Component-Rules-101 and that is not supported by the Windows Installer.

Rob Mensching
So this means that each registry item should be in its own components ... wowNow i understand why no company is using MSP
Registry keys are interesting. I typically suggest putting registry keys with the files they beling with (such as COM registration) and registry keys that aren't associated with anything in their own Components. Smaller Components are better than bigger Components.Yes, patching is challenging. If major upgrades work for you, I recommend that. :)
Rob Mensching

related questions