I can't see the point of adding 2 hidden features.
I would make it like this:


        <Component Id="CreateDB_WinAuth"
Guid="3A10A7F9-E920-430a-88B1-E97584AC65E8">
                <!-- Create a DB with Windows Authentication -->
                <Condition><![CDATA[WINAUTH = "yes"]]></Condition>
                <SqlDatabase Id='SqlDatabaseWinAuth' Database='TranspoDispo'
Server='[DBSERVER]' CreateOnInstall='yes' DropOnUninstall='no'
ContinueOnError='no' />
        </Component>


        <Component Id="CreateDB_SqlAuth"
Guid="6FAE9F5E-AFF8-4b15-B9EE-BA427854D461">
                <!-- Create a DB with SQL-Server Authentication -->
                <Condition><![CDATA[WINAUTH = "no"]]></Condition>
                <SqlDatabase Id='SqlDatabaseSQLAuth' Database='TranspoDispo'
User='DBCreationUser' Server='[DBSERVER]' CreateOnInstall='yes'
DropOnUninstall='no' ContinueOnError='no' />
        </Component>


        <Feature Id="Feature_DB" Title="Database" Level="1">
                <ComponentRef Id="CreateDB_WinAuth" />
                <ComponentRef Id="CreateDB_SqlAuth" />
        </Feature>



There's no need of removing features when clicking on the "Next" button
either.

BR,
Natalia



Daniel Janz-2 wrote:
> 
>       Finally I found a way to give the user a choice and don't want to
>       withhold it:
> 
> 
> 
>       I use two components, one for SQL-Auth and one for Win-Auth:
>       
>               <Component Id="CreateDB_WinAuth"
> Guid="3A10A7F9-E920-430a-88B1-E97584AC65E8">
> 
>                       <!-- Create a DB with Windows Authentication -->
> 
>                       <SqlDatabase Id='SqlDatabaseWinAuth' 
> Database='TranspoDispo'
> Server='[DBSERVER]' CreateOnInstall='yes' DropOnUninstall='no'
> ContinueOnError='no'>
>                       </SqlDatabase>
> 
>               </Component>
> 
> 
> 
>               <Component Id="CreateDB_SqlAuth"
> Guid="6FAE9F5E-AFF8-4b15-B9EE-BA427854D461">
>                       
>                       <!-- Create a DB with SQL-Server Authentication -->
> 
>                       <SqlDatabase Id='SqlDatabaseSQLAuth' 
> Database='TranspoDispo'
> User='DBCreationUser' Server='[DBSERVER]' CreateOnInstall='yes'
> DropOnUninstall='no' ContinueOnError='no'>
>                       </SqlDatabase>
> 
>               </Component>
> 
> 
> 
>               Additionally I have two features which get installed as default 
> but
>               which are not displayed in the feature tree of the UI:
> 
>               <Feature Id="Feature_DB_WinAuth" Title="Database" Level="1"
>               Display="hidden">
> 
>                       <ComponentRef Id="CreateDB_WinAuth" />
> 
>               </Feature>
> 
>               <Feature Id="Feature_DB_SqlAuth" Title="Database" Level="1"
> Display="hidden">
> 
>                       <ComponentRef Id="CreateDB_SqlAuth" />
> 
>               </Feature>
> 
> 
> 
>               And a dummy feature which refs the two DB-Features:
> 
>               <Feature Id="Feature_DB_DUMMY" Title="Database" Level="1">
> 
>                       <FeatureRef Id="Feature_DB_WinAuth" />
> 
>                       <FeatureRef Id="Feature_DB_SqlAuth" />
> 
>               </Feature>
> 
> 
> 
>               In the UI I have to do the following:
> 
>               <RadioButtonGroup Property="WINAUTH">
> 
>                       <RadioButton Text="Windows Authentifizierung" X="5" 
> Y="0" Width="300"
> Height="15" Value="yes" />
> 
>                       <RadioButton Text="SQL-Server Authentifizierung" X="5" 
> Y="20"
> Width="300" Height="15" Value="no" />
> 
>               </RadioButtonGroup>
> 
> 
> 
>               <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
> Height="17" Default="yes" Text="[Button_Next]">
> 
>                       <Publish Event="Remove" 
> Value="Feature_DB_SqlAuth">WINAUTH =
> "yes"</Publish>
> 
>                       <Publish Event="Remove" 
> Value="Feature_DB_WinAuth">WINAUTH =
> "no"</Publish>
> 
>                       <Publish Event="NewDialog" 
> Value="VerifyReadyDialog">1</Publish>
> 
>               </Control>
>       
> 
> 
>       This works fine for me
> 
> 
> 
>       Daniel
> 
> 
> 
-- 
View this message in context: 
http://n2.nabble.com/How-to-use-Windows-Authentication-for-SQL-Server-with-WiX--tp707468p2521595.html
Sent from the wix-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
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

Reply via email to