Good stuff! Thanks for sharing.

On 3/19/07, pobox77 <[EMAIL PROTECTED]> wrote:


Here my solution:

    <util:User Id="SQLUser" Name="[SQLUSERNAME]"
Password="[SQLUSERPASSWORD]" />
...
      <!--database authentification, SQLUSER will be used -->
      <!-- SQLUSERNAME and SQLUSERPASSWORD will be entered in a customized
dialog -->
      <Component Id="CreateDBUser" DiskId="1" Guid="YOURGUID">
        <sql:SqlDatabase Id="dbUser" Server="[SQLSERVER]"
Database="[SQLDBNAME]" CreateOnInstall="yes" ConfirmOverwrite="yes"
DropOnReinstall="no" DropOnUninstall="no" User="SQLUser">
          <sql:SqlScript Id="CreateTablesSqlScriptUser"
ContinueOnError="no"
ExecuteOnInstall="yes" ExecuteOnReinstall="no" Sequence="002"
BinaryKey="CreateTablesBin" User="SQLUser" />
        </sql:SqlDatabase>
                <Condition>WIN_AUTH_DB="False"</Condition>
      </Component>
      <!-- Windows authentification, without User attribute -->
      <Component Id="CreateDBWindows" DiskId="1" Guid="YOURGUID">
        <sql:SqlDatabase Id="dbWindows" Server="[SQLSERVER]"
Database="[SQLDBNAME]" CreateOnInstall="yes" ConfirmOverwrite="yes"
DropOnReinstall="no" DropOnUninstall="no">
          <sql:SqlScript Id="CreateTablesSqlScriptWindows"
ContinueOnError="no" ExecuteOnInstall="yes" ExecuteOnReinstall="no"
Sequence="002" BinaryKey="CreateTablesBin" />
        </sql:SqlDatabase>
                <Condition>WIN_AUTH_DB="True"</Condition>
      </Component>
...
    <!-- this script will be used for both above -->
    <Binary Id="CreateTablesBin" SourceFile="Create XCB
Tables_Views_StoredProcedures.sql">
    </Binary>
...
        <!-- the property  WIN_AUTH_DB will be set using a radio button
control in the same customized dialog
              as username and password -->
        <!-- the property must be "global", eg. its name uses capitals
only
-->
        <Control Id="SecurityButtons1" Type="RadioButtonGroup" X="90"
Y="142" Width="197" Height="30" Property="WIN_AUTH_DB">
        </Control>
...
      <RadioButtonGroup Property="WIN_AUTH_DB">
        <RadioButton Text="{\DlgFont8}&amp;Integrated Security (Windows
authentification)" Value="True" X="0" Y="0" Width="206" Height="12" />
        <RadioButton Text="{\DlgFont8}&amp;User Name and Password"
Value="False" X="0" Y="15" Width="206" Height="15" />
      </RadioButtonGroup>





Dhaval Patel-4 wrote:
>
> I'd be interested in seeing your solution, Peter. Can you post your
> solution
> on the Wix-users list for future reference? I feel this shouldn't be
hard,
> but if you already have it, then why reinvent the wheel!
>
> Thanks in advance.
>
>
> On 3/13/07, pobox77 <[EMAIL PROTECTED]> wrote:
>>
>>
>> Thanks Dana,
>>
>> I've just found the same solution about an hour ago.
>>
>> Just a note for people having similar problem:
>>
>> The property used by the radio button and in the condition must be a
>> global
>> property
>> (e.g. the name of it should only have capitals) otherwise it doesn't
>> work.
>>
>> Peter
>>
>>
>> Dana Gutride wrote:
>> >
>> > This is not possible within the sql database tag right now.  There is
a
>> > bug/feature request in for this exact functionality, but as far as I
>> can
>> > tell, it hasn't been added yet.  The only way to do this is to have
two
>> > sqldatabase tags in separate components and then add conditions for
the
>> > components based on the radio button's property.
>> >
>> > Dana
>> >
>> > On 3/13/07, pobox77 <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Sorry, the snippet was wrong formatted.
>> >>
>> >>
>> >> pobox77 wrote:
>> >> >
>> >> > Hi,
>> >> >
>> >> > I would like to create a SqlDatabase either with Username+Password
>> or
>> >> with
>> >> > Windows authentification. I am using a radio button in a customize
>> >> dialog.
>> >> > If not Windows auth. is selected, the user can enter a username
and
>> a
>> >> > password.
>> >> > How should I set the SqlDatabase component to do it? I mean, if
>> Windows
>> >> > auth. the User="SQLUser" should not be used.
>> >> >
>> >> > Snippet:
>> >> >
>> >> >       <Component Id="CreateDB" DiskId="1"
>> >> > Guid="????????-????-????-????-????????????">
>> >> >         <sql:SqlDatabase Id="MyDb" Server="[SQLSERVER]"
>> >> > Database="[SQLDBNAME]" CreateOnInstall="yes"
ConfirmOverwrite="yes"
>> >> > DropOnReinstall="no" DropOnUninstall="no" User="SQLUser">
>> >> >           <sql:SqlScript Id="CreateTablesSqlScript"
>> >> ContinueOnError="no"
>> >> > ExecuteOnInstall="yes" ExecuteOnReinstall="no" Sequence="002"
>> >> > BinaryKey="CreateTablesBin" User="SQLUser" />
>> >> >         </sql:SqlDatabase>
>> >> >       </Component>
>> >> >
>> >> >     <Feature Id="SqlDb" Title="Create Database"
>> Description="Installing
>> >> > database. Please ensure that the SQL Server is running on the
target
>> >> > server." AllowAdvertise="yes" TypicalDefault="install"
>> Display="expand"
>> >> > Level="1">
>> >> >       <ComponentRef Id="CreateDB" />
>> >> >     </Feature>
>> >> >
>> >> >
>> >> > Thanks in advance,
>> >> > Peter
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>>
http://www.nabble.com/Creating-SqlDatabase-with-without-Windows-Authentification-tf3394305.html#a9449474
>> >> Sent from the wix-users mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>>
-------------------------------------------------------------------------
>> >> Take Surveys. Earn Cash. Influence the Future of IT
>> >> Join SourceForge.net's Techsay panel and you'll get the chance to
>> share
>> >> your
>> >> opinions on IT & business topics through brief surveys-and earn cash
>> >>
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> _______________________________________________
>> >> WiX-users mailing list
>> >> WiX-users@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/wix-users
>> >>
>> >
>> >
>>
-------------------------------------------------------------------------
>> > Take Surveys. Earn Cash. Influence the Future of IT
>> > Join SourceForge.net's Techsay panel and you'll get the chance to
share
>> > your
>> > opinions on IT & business topics through brief surveys-and earn cash
>> >
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> > _______________________________________________
>> > WiX-users mailing list
>> > WiX-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/wix-users
>> >
>> >
>>
>> --
>> View this message in context:
>>
http://www.nabble.com/Creating-SqlDatabase-with-without-Windows-Authentification-tf3394305.html#a9453722
>> Sent from the wix-users mailing list archive at Nabble.com.
>>
>>
>>
-------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys-and earn cash
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>
>
-------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>

--
View this message in context:
http://www.nabble.com/Creating-SqlDatabase-with-without-Windows-Authentification-tf3394305.html#a9547806
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to