Since writing registry keys is something that is built into Windows Installer, I would recommend using "semi-custom actions" if you have to compute the registry keys/values at install time. See Bob Arnson's blog: http://www.joyofsetup.com/2007/07/01/semi-custom-actions/
That allows Windows Installer to deal with install, removal, rollback, etc. -----Original Message----- From: nandini sa [mailto:nandini...@gmail.com] Sent: Tuesday, December 08, 2009 5:03 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Deferred Custom Action Hi, I have a custom action that makes a registry entry both during install and uninstall. The custom action is deferred and thus I use another custom action to set the custom action data. This works well in both scenarios (install and uninstall). However if UAC is turned on, then the uninstall custom action fails. The custom action called during install works correctly. The uninstall custom action is called but the problem I figured is that the office version passed as Custom Action data is not getting set. I fail to understand as to why it is not getting set during uninstall since, during install (when UAC is on) the property gets set. What change should I make to my custom action called during uninstall in UAC mode so that the custom action data is set? The install execute sequence is as follows: <!-- Custom actions for registry entry --> <CustomAction Id="RegistryEntries.Setup" Property="RegistryEntries" Value=" OfficeVersion=[OfficeVersion]" /> <CustomAction Id="RegistryEntries" BinaryKey="VSTOCustomAction" DllEntry=" RegisterAddin" Execute="deferred" Impersonate="no" /> <CustomAction Id="RegistryEntriesUninstall.Setup" Property=" RegistryEntriesUninstall" Value="OfficeVersion=[OfficeVersion]" /> <CustomAction Id="RegistryEntriesUninstall" BinaryKey="VSTOCustomAction" DllEntry="UnregisterAddin" Execute="deferred" Impersonate="no" /> <!-- Sets the office version for registry entries --> <CustomAction Id="SetOfficeVersion" Property="OfficeVersion" Value="12.0" Execute="immediate" /> <InstallExecuteSequence> <Custom Action="SetOfficeVersion" After="LaunchConditions"><![CDATA[some property evaluated in launch condition]]></Custom> <!-- Registry entry while installing --> <Custom Action="RegistryEntries.Setup" After="InstallFiles">1</Custom> <Custom Action="RegistryEntries" After="RegistryEntries.Setup>NOT Installed </Custom> <!--Registry entry while removing --> <Custom Action="RegistryEntriesUninstall.Setup" After="InstallFiles">1</ Custom> <Custom Action="RegistryEntriesUninstall" After=" RegistryEntriesUninstall.Setup">Installed and Remove</Custom> </InstallExecuteSequence> Thanks in advance, Nandini ---------------------------------------------------------------------------- -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users