You can only do this from an elevated start. One of the detours people use instead of an elevated command line is a bootstrapper that gets the elevation prompt and then starts the UI.
Phil Wilson -----Original Message----- From: Dylan Moline (Volt) [mailto:a-dyl...@microsoft.com] Sent: Thursday, January 22, 2009 2:12 PM 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