You are scheduling your custom action too late. Feature conditions are evaluated by the CostFinalize action and cannot be changed after that point. Just move your custom action before CostFinalize.
-----Original Message----- From: Balu Swaminathan [mailto:bswa...@hotmail.com] Sent: 24 July 2009 07:45 To: wix user list Subject: [WiX-users] Setting session variable in managed custom action andaccessing it. Hello: My goal is to write a sql server db installer which would install the db only if it is not there. Leave the db on unstall scenario. Searched around the web and could not find anything. Came across this post from Rob and few similar on the web... "You'd have to write a CustomAction to search for the SQL database and set a Property or something like that. It's on the feature requests but hasn't been added to the SQL code today." OK.. I wrote a managed custom action and invoked it. That was not hard. Thanks folks. But then I could not read a session variable set in managed code in installation. Here is what I have: In managed code: session["FROMCUSTOMACTION"] = "1"; In Wxs file: <InstallExecuteSequence> <Custom Action="CustomActionIdHere" Before="InstallInitialize" /> </InstallExecuteSequence> <Feature Id='SqlFeature' Title='SqlFeature' Level='1'> <!-- If the condition is true, level will be 0 and the feature will not be installed. --> <Condition Level='0'>FROMCUSTOMACTION=1</Condition> <ComponentRef Id='SqlComponent'/> </Feature> <Property Id='SQLUSER'>username</Property> <Property Id='FROMCUSTOMACTION'>0</Property> What am I doing wrong here ? Thanks balu. Ps: And then I have to solve the db issue. _________________________________________________________________ Bing(tm) brings you maps, menus, and reviews organized in one place. Try it now. http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=T XT_MLOGEN_Local_Local_Restaurants_1x1 ------------------------------------------------------------------------ ------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users