Rather than fighting the Windows Installer Service, use a different pattern. For every property that has a component that writes it to the registry, I have a matching RegistrySearch that loads the property with the contents of the property written out by the matching component. Repairing and Patching (and upgrading to a lesser degree) doesn't work right if properties like INSTALLFOLDER aren't "remembered" in this way.
Mucking with the REINSTALLMODE inside the installer is seldom a good idea. That being said, the property you would want is REINSTALLMODE and not MSIREINSTALLMODE. NeverOverWrite probably doesn't do what you think. :) -- John Merryweather Cooper Build & Install Engineer -- ESA Jack Henry & Associates, Inc.(r) Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -----Original Message----- From: Swaroop Kare [mailto:swaroop.k...@ifdspercana.com] Sent: Thursday, August 29, 2013 11:34 AM To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] Prevent Registry entries from Overwritten by a Patch Hi, Can anyone tell me how to prevent overwriting of Registry entries during a Patch install. I have tried to prevent them by adding below code in the installer, but was unsuccessful Method1: <Property Id="MSIREINSTALLMODE" Value="so"/> Method2: <Component Id="clientReg" KeyPath="yes" NeverOverwrite="yes" Guid="{Put-GUID}" > <RegistryKey Root="HKLM" Key="SOFTWARE\MyProject"> <RegistryValue Type="string" Name="LogPath" Value="[INSTALLFOLDER]LogFiles"/> <RegistryValue Type="string" Name="LogMode" Value="1"/> <RegistryValue Type="string" Name="LogCacheSize" Value="20"/> </RegistryKey> </Component> Below is my trace file: Action 14:21:51: WriteRegistryValues. Writing system registry values . . . MSI (s) (8C:E0) [14:21:51:645]: Executing op: RegAddValue(Name=LogPath,Value=E:\MyProject \LogFiles,) MSI (s) (8C:E0) [14:21:51:645]: Executing op: RegAddValue(Name=LogMode,Value=1,) MSI (s) (8C:E0) [14:21:51:661]: Executing op: RegAddValue(Name=LogCacheSize,Value=20,) Thanks This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which it is addressed and may contain information which is privileged, confidential or prohibited from disclosure or unauthorised use. You are hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message or its attachments other than by it's intended recipient is strictly prohibited by the sender. If you have received this email in error, please notify the system manager by email at ad...@ifdspercana.com Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, this email has been scanned for the presence of viruses. The recipient should also check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email ______________________________________________________________________________________ IFDS Percana Group Limited, no. 307152, is registered in Ireland at 16 Joyce Way, Park West Business Park, Dublin 12, Ireland. Directors: Eugene Larmon, Patrick Concannon, William Slattery, Paul O'Neil (UK), Simon Hudson-Lund (UK) and Stephen Parkinson (UK) IFDS Percana International Managed Services Limited, no. 368022, is regulated by the Central Bank of Ireland. Registered in Ireland at 16 Joyce Way, Park West Business Park, Dublin 12, Ireland. IFDS Percana International Managed Services Limited is a wholly owned subsidiary of IFDS Percana Group Limited and provides support services to the life and pensions industry. Directors: Eugene Larmon, Patrick Concannon, Stephen Parkinson (UK) and Paul O'Neil (UK). www.ifdspercana.com ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users