Is my understanding of the RegistryKey's action parameters incorrect?

Recently, we moved from having the keys with the Action parameter set to 
'createAndRemoveOnUninstall', to 'create'.  We were clobbering keys between 
applications with this setting.  When rereading the documentation, it is 
unclear to me if it is going to also remove the key value even if another 
application placed one correctly through Windows Installer.

Regardless, we started having orphaned registry keys on the system after making 
this change.  And after reviewing them, they all  were Registry keys that did 
not yet have any children.

For instance, we had '<RegistryKey Key="ActiveTasks" Action="create" />'.  This 
key needed to be present for an application to function, and after the service 
has been configured, it will place some registry values.  However, I have 
noticed that having this statement, Windows Installer leaves the key, even if 
our application has not yet placed any values.  I would have expected Windows 
Installer to remove it based on documentation.

However, other places in our code do not exhibit this behavior, but all the 
rest of the locations specifically call out a RegistryValue child for them, as 
in:
<RegistryKey Root="HKLM" Key="MyParentKey" Action="create">
  <RegistryValue Name="MyValue" Type="string" Value="test" KeyPath="yes" />
</RegistryKey>


After uninstalling, the above key was successfully removed, while the 
ActiveTasks key remained, with no attached registry values.

Setting the Action to 'createAndRemoveOnUninstall' on the first registry key 
does correctly remove the whole key, but it certainly seems that it shouldn't 
be a requirement.  Our intention is to specifically begin calling out registry 
values that should be removed in the future, but we aren't there yet, but at 
that time it will be a moot point I think.

So, to summarize my question, is it expected behavior that if I declare a 
RegistryKey, with the Action set to Create, with no children, and my 
application does not create children or values, that Windows Installer will not 
remove the key on full product uninstall (WiX 3.5)?

Thanks!

Mark E. Scott Jr.
msc...@scott-usa.com<mailto:msc...@scott-usa.com>


------------------------------------------------------------------------------
Cloud Computing - Latest Buzzword or a Glimpse of the Future?
This paper surveys cloud computing today: What are the benefits? 
Why are businesses embracing it? What are its payoffs and pitfalls?
http://www.accelacomm.com/jaw/sdnl/114/51425149/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to