To be elevated you must be deferred (unless the entire install is elevated but that shouldn't be the goal). More importantly, you need to be deferred to correctly support rollback.
CustomActions that modify system state should be deferred with rollback actions as well. -----Original Message----- From: Dylan Moline (Volt) [mailto:a-dyl...@microsoft.com] Sent: Thursday, January 22, 2009 14:12 To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] How to Get a Custom Action to run with Elevated Permissions So I have a custom action which is called during the UI, but before the user elevates. If I run it from a elevated command line, it installs properly, but if I run it by double clicking, it will not complete the custom action properly (as the CA calls a DLL which modifies the registry). Here is a snippet. <CustomAction Id="OptIn" BinaryKey="prmuoptin" DllEntry="PerformMUOptIn" Impersonate="no" Execute="immediate" Return="ignore"/> I call OptIn before I install the product (which is where the user elevates). If I set it as execute="deferred" it tells me it gives me an error 2762. What do I need to do to get this CA to have elevated authorization. ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users