Correct, it is a configuration value that the application can change. Putting a default in the application makes sense. Is it good practice to remove values on uninstall?
Neil >You don't explicitly say but it sounds like a configuration value. The >requirement that a value not be removed during upgrade suggests that it >can >be modified after installation. If that's true, it's not recommended to >install such a value. Have the application assume or write the default >value >whenever it's missing. > >If you're using a later scheduling of RemoveExistingProducts, you might be >able to add a component containing a RemoveRegistryKey to clean up when >the >user removes the application. This wouldn't be removed as long as you >added >the exact same component to all the later versions of the installer. > >-----Original Message----- >From: Neil Sleightholm [mailto:n...@x2systems.com] >Sent: 28 October 2012 08:39 >To: General toolset. (wix-users@lists.sourceforge.net) >Subject: [WiX-users] Setting DWORD registry keys > >In my installation I need to set a dword registry to a default value when >the >install is first run and remove the key on uninstall but not change it on >an >upgrade. I am struggling to find a way to do reliably and wondered if >anyone >had any suggestions. > >Here is what I have tried: > >1. Read the existing value with <RegistrySearch> and rewrite it on >upgrade, this fails because DWORDs come back prefixed with a hash (#) and ><RegistryValue> causes this to be written as a string. > >2. Read the existing value with <RegistrySearch> and Condition the ><RegistryValue> so it is only written when the value is not set. The >problem >with this is that on upgrade the key is removed. > >I can solve this by writing a CA to read the values but I am sure there >must >be a standard way of doing this that is eluding me. > >Neil > >Neil Sleightholm >X2 Systems Limited >n...@x2systems.com<mailto:n...@x2systems.com> > >-------------------------------------------------------------------------- >--- >- >WINDOWS 8 is here. >Millions of people. Your app in 30 days. >Visit The Windows 8 Center at Sourceforge for all your go to resources. >http://windows8center.sourceforge.net/ >join-generation-app-and-make-money-coding-fast/ >_______________________________________________ >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. > > >-------------------------------------------------------------------------- >---- >The Windows 8 Center - In partnership with Sourceforge >Your idea - your app - 30 days. >Get started! >http://windows8center.sourceforge.net/ >what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/ >_______________________________________________ >WiX-users mailing list >WiX-users@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users