Hi Nick, Just a note, I used that same method for an installation project I worked on. I discovered that if the user running your install does not have Microsoft.SqlServer.Management.Smo and its dependencies in their GAC your installer will crash. You may be better off with using System.Data.Sql as it is included in the .Net framework.
Nicholas Miller (Network Administrator) LiveTechnology Holdings, Inc. LiveTechnology Park: 16 Sterling Lake Rd, Tuxedo Park, NY 10987 Phone: 845.351.5100 Direct: 845.535.6205 Fax: 845.351.5102 Email: nmil...@livetechnology.com Website: www.LiveTechnology.com -----Original Message----- From: Miller, Nick (GE Intelligent Platforms) [mailto:nick.mil...@ge.com] Sent: Monday, April 08, 2013 4:41 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Problem with SqlDatabase extension FWIW, I figured out my problem. I was actually trying to use the technique for using SQL or Windows authentication found here. http://stackoverflow.com/questions/14480837/wix-database-deployment-installation However, the property I was using in my conditional was being set too late, so it was being evaluated correctly. Thanks, Nick -----Original Message----- From: ptr [mailto:ptrajku...@gmail.com] Sent: Monday, April 08, 2013 3:16 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Problem with SqlDatabase extension Just a wild guess but is it possible that custom action is not being run as user who is doing an install. On Mon, Apr 8, 2013 at 12:01 PM, Miller, Nick (GE Intelligent Platforms) < nick.mil...@ge.com> wrote: > Hi, > > I have a Wix file where I'm using the <SqlDatabase> element to create > a database. I've omitted the User attribute, because I want it to use > Windows Authentication of the currently logged in user (as per the > documentation). > > "The User attribute references credentials specified in a User > element. If a user is not specified then Windows Authentication will > be used by default using the credentials of the user performing the > install to execute sql strings, etc. " > > During runtime however, it fails with the following. > "MSI (s) (A0:24) [13:51:38:920]: Executing op: > ActionStart(Name=CreateDatabase,Description=Creating Databases,) > Action 13:51:38: CreateDatabase. Creating Databases MSI (s) (A0:24) > [13:51:38:920]: Executing op: > CustomActionSchedule(Action=CreateDatabase,ActionType=25601,Source=Bin > aryData,Target=**********,CustomActionData=**********) > MSI (s) (A0:1C) [13:51:38:920]: Invoking remote custom action. DLL: > C:\WINDOWS\Installer\MSID48.tmp, Entrypoint: CreateDatabase > CreateDatabase: Error 0x80040e4d: failed to create to database: > 'TestDB', > error: unknown error" > > In the SQL Server log, it shows a failed login attempt with an empty > user name. > "Date 4/8/2013 1:51:39 PM > Log SQL Server (Current - 4/8/2013 1:51:00 PM) > > Source Logon > > Message > Login failed for user ''. Reason: Could not find a login matching the > name provided. [CLIENT: <named pipe>]" > > Note that the user string is empty (''). It appears that the > SqlDatabase extension is not picking up the Windows user information. > > Has anyone else seen this behavior? Could it be a bug in the Sql > Extension? > > I am using Wix version 3.6. > > Thanks, > > Nick > > > > Nick Miller > GE Intelligent Platforms > Senior Software Engineer > > T (518) 464-4503 > F (518) 464-4613 > C (518) 281-1898 > D 8*687-4503 > E nick.mil...@ge.com<mailto:nick.mil...@gefanuc.com> > > 1 Columbia Circle, Albany, NY 12203 > www.ge-ip.com<http://www.gefanuc.com> > Confidentiality Notice > This e-mail transmission (and/or the documents accompanying it) may > contain information belonging to the sender, which is confidential, > privileged and/or exempt from disclosure under applicable law. The > information is intended only for the use of the individual(s) or > entity named above. If you are not the intended recipient, you are > hereby notified that any disclosure, copying, distribution or the > taking of any action in reliance on the contents of this information > is strictly prohibited. If you have received this e-mail transmission > in error, please immediately notify us by return e-mail or telephone > to arrange for return of its contents including any documents. > > > ---------------------------------------------------------------------- > -------- Minimize network downtime and maximize team effectiveness. > Reduce network management and security costs.Learn how to hire the > most talented Cisco Certified professionals. Visit the Employer > Resources Portal > http://www.cisco.com/web/learning/employer_resources/index.html > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users