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