John, how were you able to accomplish this? I tried to explicitly do this
like so:

<Property Id="EMPTY_USER"  />
<Property Id="EMPTY_PASSWORD" />

<util:User Id='SqlInstallerUserId'
Name='[EMPTY_USER]'
Password='[EMPTY_PASSWORD]' />

Doing so yields "ExecuteSqlStrings:  Error 0x80040e4d: failed to
connect to database: '<my database>'" in the output log, and the
EMPTY_USER and EMPTY_PASSWORD do not even show up (because they were
never set).

I'm not sure how to get them to evaluate to empty, but I thought that
would suffice. Since it did not, then I tried this:

<Property Id="EMPTY_USER" Value="something"  />
<Property Id="EMPTY_PASSWORD" Value="something" />
<SetProperty Id="EMPTY_USER" After="AppSearch" Value="" />
<SetProperty Id="EMPTY_PASSWORD" After="AppSearch" Value="" />

In the output log, I see the original property values, then when it
sets them to empty it says it's "Deleting" the properties because
their values are empty, and I still get the same error:

ExecuteSqlStrings:  Error 0x80040e4d: failed to connect to database:
'<my database>'

I have a feeling I'm missing something simple.

Additionally, I thought I would be able to set the "User_" column of
the "SqlDatabase" table to a NULL to try to get that to happen, but
apparently you can't modify a value in the MSI database at runtime?

Thanks in advance,

Levi





On Tue, Mar 11, 2014 at 11:42 AM, John Cooper <jocoo...@jackhenry.com>wrote:

> Yes.  In your case, if SQL_ADMIN_USERNAME and SQL_ADMIN_PASSWORD both
> evaluate to empty-string, then the sql:SqlDatabase will deploy with Windows
> Authentication.
>
> I use this pattern all the time.
>
> --
> John Merryweather Cooper
> Build & Install Engineer - ESA
> Jack Henry & Associates, Inc.®
> Shawnee Mission, KS  66227
> Office:  913-341-3434 x791011
> jocoo...@jackhenry.com
> www.jackhenry.com
>
>
>
> -----Original Message-----
> From: Levi Wilson [mailto:l...@leviwilson.com]
> Sent: Tuesday, March 11, 2014 10:33 AM
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] Conditional SSPI / SQL Authentication on SqlScript
>
> I have a component that has multiple <SqlScript /> elements. In my dialog
> sequence  I allow the user to choose whether or not they want to use SQL or
> Windows Authentication for the connection.
>
> Each <SqlScript /> references my <SqlDatabase /> that currently looks like
> this:
>
> <util:User Id='SqlInstallerUserId'
>   Name='[SQL_ADMIN_USERNAME]'
>   Password='[SQL_ADMIN_PASSWORD]' />
>
> <sql:SqlDatabase Id="CompassFrameworkDatabase"
>   Server="[SQL_SERVER]" Database="[SQL_DATABASE]"
>   User="SqlInstallerUserId" />
>
> The problem is that will never work with Windows Authentication :-)
>
> I've seen some have two different components that specified different
> <SqlDatabase /> elements, but I would rather not do that.
>
> Is there a way to basically "clear" the "User_" record in the SqlDatabase
> table in the MSI to force it to use Windows Authentication depending on
> what the user chose in the dialog?
>
> Thanks in advance.
>
> Levi
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is
> the definitive new guide to graph databases and their applications. Written
> by three acclaimed leaders in the field, this first edition is now
> available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> NOTICE: This electronic mail message and any files transmitted with it are
> intended
> exclusively for the individual or entity to which it is addressed. The
> message,
> together with any attachment, may contain confidential and/or privileged
> information.
> Any unauthorized review, use, printing, saving, copying, disclosure or
> distribution
> is strictly prohibited. If you have received this message in error, please
> immediately advise the sender by reply email and delete all copies.
>
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to