Yes, we do it in a very similar way.  We just treat the status of 
IntegratedSecurity as another component of building a valid connection string.  
As part of the dialog process, the UI visible bits (server/instance, 
Authentication Type, and User and Password (if SQL Authentication)), are passed 
to a custom action which reassembles them against a template of the default 
connection string.  This is then passed to a second custom action which sets a 
property based on whether an actual connection can be made using the built 
connection string.  If a connection can be made, the user is moved on to the 
next dialog, and ultimately the database deployment custom actions are run 
using the generated connection string.

--
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: Skildum, Mathew [mailto:mathew.skil...@aspect.com] 
Sent: Monday, January 28, 2013 1:46 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Best way to choose Windows Auth vs. SQL Auth

I do this by presenting a dialog to the user and they can choose which option 
they want.  I then have a single action on the back end that sets up the 
correct ADO.Net connection string based on the users choices.

By doing this you are not duplicating code, you just have a minor detour is SQL 
authentication is selected as that requires a few more option in the connection 
string. 

Mat Skildum


-----Original Message-----
From: George Fleming [mailto:gef...@microsoft.com]
Sent: Monday, January 28, 2013 1:22 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Best way to choose Windows Auth vs. SQL Auth

I need to create a database, and let user choose Windows Auth or SQL Auth.  It 
looks like you could do it with two different components, and two separate 
conditions, but that doesn't seem very elegant and creates duplicate code.

I see old threads such as this that seem like a better solution, but I don't 
know if it's ever been implemented.
http://www.mail-archive.com/wix-devs@lists.sourceforge.net/msg01154.html

Anyone has example on the current (and elegant) way to choose the SQL 
authentication mode?  How do I create a null util:user?

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, 
Windows 8 Apps, JavaScript and much more. Keep your skills current with 
LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. 
ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, 
Windows 8 Apps, JavaScript and much more. Keep your skills current with 
LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. 
ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
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.


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to