The way I would do this is the custom action should be firstSequence, the value stored in a secure property and you should use a RegistrySearch to read the value during maintenance operations. If you have all those pieces in place, then it's just a matter of getting all the conditions right.
If you are having problems identifying first install verses an upgrade or repair, you might want to look at http://code.dblock.org/msi-property-patterns-upgrading-firstinstall-and-maintenance which provides a nice wxi file giving some cleanly named properties for the different logical states you are in. Note, for this to work it is vital that RemoveExistingProducts is scheduled After InstallInitialize. This may or may not be appropriate in your situation. -----Original Message----- From: jhennessey [mailto:jack.hennes...@hyland.com] Sent: Thursday, June 21, 2012 7:34 AM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Scheduling Custom Action Ravi Raj wrote > > I am populating UserName property in UI textbox and then storing it in > registry. For this I am using custom action to set this variable at > UISqeuence and ExecuteSequence. Everything works great. > > I found that if I change this value to something else, my registry is > never changes to new value. i saw that log then found that in > UISequence its fine but in ExecuteSequence it changes back to normal. > I need to fix this. > > I cannot remove the custom action from ExecuteSequence as if I do that > then at the repair (with no UI just Right-Click -> Repair) I found > that, the registry value gets deleted (i am not sure why as verbose > sows that value as empty). But having both CAs intact, it works great. > > Again, if I manually the registry value (just for testing), and do > repair using Maintenance dialog, the registry value resets to the > original > (default) value. > > I am totally lost how to resolve this? > If you have a custom action that you only want to run once (but need to schedule in both the UI and Execute sequences to cover all your bases ) then you should set the CustomAction/@Execute attribute to "firstSequence". See WiX.chm for more details. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Scheduling-Custom-Action-tp7579001p7579008.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users