We've dealt with this extensively. It's because Windows authentication doesn't work by supplying a username/password (that's SQL auth). The calling process must be running as that user, so what you need is impersonation.
You need to ask the user whether he wants to do SQL or Windows auth. If he wants SQL auth, that's what you need to create your database with, make it a separate component conditioned on that. If the user wants to do Windows auth, don't ask him to enter credentials, he's installing as the current user. If you want him to enter windows auth credentials, the deferred CA needs to impersonate, which is not implemented in the wix extensions. In http://msiext.codeplex.com you have reusable dialogs with "test connection" buttons, advanced parameters for SQL server like where to put LDF/MDF files (recommend path), DMO list of available SQL databases, etc., so you can skip reinventing the wheel. I am not 100% whether we dealt with the scenario of windows impersonation for creating the database, but if we didn't, it's something that wouldn't be too hard to contribute. cheers dB. dB. @ dblock.org Moscow|Geneva|Seattle|New York -----Original Message----- From: Robert Hermann [mailto:rob.herm...@nicewareintl.com] Sent: Thursday, December 10, 2009 9:35 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] sql database <sql:SqlDatabase> creation and Users I'm writing an install that will create a sql database. I've got my server set to Windows and Sql Authenication mode. When I run the install and ask for a user with permission to install the database, I've got two scenarios: 1) Using a windows network based user. This user is a sql user (inside the sql server management studio) as well. I type in MYDOMAIN\myusername (generically speaking) as a user and then type in the password. The install can not create my database. It throws an error. 2) When I use a sql based user, that is a user present inside the sql server management studio but this user is not a registered windows network user, the database creation works. If both users have the same sql rights, why would a network based user be unable to create the database where the purely Sql user can. I've also tried using myusername (vs. MYDOMAIN\myusername) and I get the same results. Rob Hermann Senior Software Developer Niceware International, LLC 10437 Innovation Drive Suite 147 Milwaukee, WI 53226 Tel: 414-476-6423 x110 Fax: 414-476-7955 Email: rob.herm...@nicewareintl.com http://www.nicewareintl.com http://healthcare.nicewareintl.com December 4th - 10:30AM CST - 11:30AM CST - Benefits of Upgrading from NiceLabel v3 to NiceLabel v5 - Register Today! December 11th - 10:30AM CST - 11:30AM CST - A Complete Introduction to LabelClinic CT - Register Today! December 18th - 10:30AM CST - 11:30AM CST - A Complete Introduction to NiceLabel SDK and WebSDK - Register Today! The information in this e-mail and any attachments is confidential and may be subject to legal professional privilege. It is intended solely for the attention and use of the named addressee(s). If you are not the intended recipient or person responsible for delivering this information to the intended recipient, please notify the sender immediately. Unless you are the intended recipient or his/her representative you are not authorized to, and must not, read, copy, distribute, use or retain this message or any part of it ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users