Daniel wrote a nice summary here
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Removing-Regist
ry-Value-tp6557782p6562164.html
-----Original Message-----
From: Mark E. Scott Jr. [mailto:msc...@scott-usa.com] 
Sent: 14 December 2011 18:48
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Removing Registry Keys Revisited

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
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
http://www.accelacomm.com/jaw/sdnl/114/51507609/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to