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™ 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=TXT_MLOGEN_Local_Local_Restaurants_1x1
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to