Classification: Public Did you try: Impersonate="yes" -----Original Message----- From: Chen, Jianxin [mailto:jianxin.c...@bakerhughes.com] Sent: July-16-13 1:59 PM To: WiX-users@lists.sourceforge.net Subject: [WiX-users] C# custom action to grant builtin user the installation folder full control
Hi, Experts, I created a C# custom action to grant the builtin\users full control of the installation target folder, but I have to run the "setup.exe as administrator" to make it work. If I just double-click the setup.exe, my custom action does not have the permission to change the folder. I have tried to use 1 <CustomAction Id="GrantFullAccessToFolder" Execute="deferred" Impersonate="no" Return="check" BinaryKey="GrantFullAccessToFolder.CA.dll" DllEntry=" GrantFullAccessToFolder "/> ... <Custom Action="GrantFullAccessToFolder" After="InstallFinalize">NOT Installed</Custom> 2 <Package InstallerVersion="301" Compressed="yes" ... InstallPrivileges="elevated" InstallScope="perMachine" /> They does not work! Any questions? Thanks! 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 This message has been marked as Public by Steven Ogilvie on July-16-13 2:06:43 PM. The above classification labels were added to the message by TITUS Message Classification. For more information visit www.titus.com. ------------------------------------------------------------------------------ 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