On 10/01/2011 14:31, Leonidas Spyropoulos wrote: > Hey gyus, > > I got a Custom Action written in C++ and called within my installer. > > The custom action is defined as: > <Fragment> > <CustomAction Id ="DatabaseConfiguration" BinaryKey="CustomAction" > DllEntry="ConfigureDatabaseFile" Execute="deferred"/> > <CustomAction Id ="DatabaseConfiguration.SetProperties" > Return="check" Property="DatabaseConfiguration" > Value="InstallLocation=[INSTALLLOCATION]|DatabaseSelection=[DATABASESELECTION]|Xpath=[DATABASEXPATH]|Username=[DATABASEUSERNAME]|Password=[DATABASEPASSWORD]|" > /> > </Fragment> > > And called as: > > <InstallExecuteSequence> > <Custom Action="DatabaseConfiguration.SetProperties" > Before="DatabaseConfiguration"><![CDATA[NOT Installed]]></Custom> > <Custom Action="DatabaseConfiguration" > Before="InstallFinalize"><![CDATA[NOT Installed]]></Custom> > </InstallExecuteSequence> > > My question is that although I can read configuration files I copy into > Program Files folder I cannot write files in it. > I can however write files on other folders. > > It should work I think since I used the Execute="deferred" parameter, right? > Any idea? >
Actually after some checking I found it. So just for reference: I had to add Impersonate="no" on the: <CustomAction Id ="DatabaseConfiguration" BinaryKey="CustomAction" DllEntry="ConfigureDatabaseFile" Execute="deferred"/> so my Custom Action will run with elevated privileges and not with the default (which are the user who runs the installer). > Thanks -- Leonidas Spyropoulos Formicary - delivering quality financial technology solutions www.formicary.net o : +44 (0)20 7920 7100 ---------------------------------------------------------------------------- This message is confidential and may be privileged. It is intended solely for the named addressee. If you are not the intended recipient, please inform us. Any unauthorised dissemination, distribution or copying hereof is prohibited. Formicary Limited registered office in England and Wales, address 1 Taillar Road, Hedon, East Yorkshire HU12 8GU, registration number 3894343, VAT number 747644304, does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference. ---------------------------------------------------------------------------- ------------------------------------------------------------------------------ Gaining the trust of online customers is vital for the success of any company that requires sensitive data to be transmitted over the Web. Learn how to best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users