That quote seems incorrect unless I'm having a slow day. If you specify "no impersonate" it means "do not impersonate the installing user" which means it runs with the local system account and elevated during a per-machine install. It's not clear to me why your custom action would fail running with the local system account, so that might bear some extra investigation. What does "does not work" mean exactly?
If you want to impersonate the installing user AND run elevated, the only way I can think of at the moment is to use an elevated bootstrapper to launch the MSI, which results in elevation of the custom actions that run with impersonation. Phil -----Original Message----- From: Chen, Jianxin [mailto:jianxin.c...@bakerhughes.com] Sent: Friday, July 19, 2013 8:35 AM To: Edwin Castro Cc: WiX-users@lists.sourceforge.net Subject: [WiX-users] elevated CustomAction with Impersonate = no and Execute="deferred" Hi, Edwin or Wix Experts, I had the issue as you mentioned in one of your replies. "One reason why this CustomAction works from an elevated command prompt but not from a non-elevated shell is that the CustomAction is scheduled outside of the installation transaction (before InstallInitialize or after InstallFinalize). All actions that occur outside the installation transaction." But, based on some old MSDN paper (http://msdn.microsoft.com/en-us/magazine/cc163486.aspx), "Many CustomActions do not specify the no impersonate flag msidbCustomActionTypeNoImpersonate, causing the CustomAction to be run as Local System." It looks like if you set Impersonate = "no", it should work. But , based on my testing, <CustomAction Id="GrantBuiltInUserFullAccessToFolder" Return="check" Execute="deferred" Impersonate="no" .../> does not work. Now my question is how to make "CustomAction" run elevated privilege permission? Is there an easy way to grant some user different access permission to different folders during Wix installation process? Thanks in advance! JC ___________________________________________________________________________ Jianxin Chen | Senior Software Engineer Baker Hughes | Software / Intelligent Production Systems jianxin.c...@bakerhughes.com<mailto:jianxin.c...@bakerhughes.com> Office: +1 713.934.4136 14990 Yorktown Plaza Drive, Houston, 77040 http://www.bakerhughes.com<http://www.bakerhughes.com/> | Advancing Reservoir Performance ---------------------------------------------------------------------------- -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users