Hello,

 

I am using the Wix SqlDatabase/SqlString/SqScript elements to create a
database in my installer. Unfortunately, I think I've lead myself into a
dead end.

 

I have a dialog that displays a combo box containing the available SQL
servers. The user can pick one. The user can also choose, via radio buttons,
between Windows and SQL Server authentication. If the SQL authentication
radio button is selected, the user can supply their SQL username & password.

 

My problem is that there doesn't seem to be an easy way to declare the
SqlDatabase element in the Wix source, such that the authentication method
is determined at runtime. This is because SQL authentication is specified
via a "User" attribute, which holds the Id of a <User> element. If the
attribute is present, I get SQL authentication; if it's absent, I get
Windows authentication. This behavior doesn't seem to be modifiable at
runtime. although I would love to be informed otherwise!

 

Obviously, I could declare two SqlDatabase elements, and play around with
component conditions so that the one with the correct authentication got
installed. This isn't desirable from a maintenance standpoint because I
would have to doubly-declare all of my SqlScripts & SqlStrings.

 

I have tried writing a little CA that gets called after the dialog, and
which changes the value of the `User_` column in the SqlDatabase table to
reflect the user's choice. Unfortunately I've had no luck whatsoever trying
to get MsiViewModify to work.

 

Does anyone have any suggestions?

 

Paul.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to