If your CA has to run in deferred mode (I guess SQL scripts require elevated privileges), have a look at the following: http://www.tramontana.co.hu/wix/lesson3.php#3.6 http://blogs.claritycon.com/blogs/sajo_jacob/archive/2008/02/28/customac tiondata-in-wix-with-deferred-custom-actions.aspx Otherwise, using a property would do the trick (string myProperty = session["MyProperty"]).
Note that if in immediate mode you serialize the CustomActionData content in the following way: "Key1=Value1;Key2=Value2;Key3=Value3" You can easily retrieve the values in the deferred CA with the following DTF code: string value1 = session.CustomActionData["Key1"] string value2 = session.CustomActionData["Key2"] Olivier -----Original Message----- From: Pankaj Agrawal (Infosys Technologies Ltd) [mailto:v-pa...@microsoft.com] Sent: Monday, March 23, 2009 10:00 PM To: datapa...@gmail.com; General discussion forWindows Installer XML toolset. Subject: Re: [WiX-users] passing parameters to c# custom action Not yet. If someone can provide that code it would be great. Thanks, Pankaj -----Original Message----- From: datapa...@gmail.com [mailto:datapa...@gmail.com] Sent: Monday, March 23, 2009 12:52 PM To: Pankaj Agrawal (Infosys Technologies Ltd) Subject: passing parameters to c# custom action Hi Pankaj, I am needing to do a similar thing (passing a parameter to a C# DTF for a sql script). I was curious if you were able to get it working, and if so if you had some code I could take a look at. Thank you! -----Original Message----- Thanks Eitan If you have the sample code to do this. Could you please pass me that? Thanks, Pankaj -----Original Message----- From: Eitan Behar [mailto:ei...@...] Sent: Thursday, February 26, 2009 1:19 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] Help required to execute Sql files Write a C# Custom Action using DTF, and pass it as parameter the folder with the sql scripts. The function then can just use OLEDB or SQLCMD to run the scripts. Eitan ------------------------------------------------------------------------ ------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users