IMO none of this really lends itself to being done during the install. To run 
with the installing user's credentials, impersonate=yes, but on UAC systems 
you're not going to be elevated unless you arrange to jump through some other 
set of hoops, and that lack of privilege may mean you cannot run the SQL script 
anyway. 

I don't know the WiX SQL Extensions work, but if you're using SQL with Windows 
security it's expecting a Windows account when you connect, presumably with 
create database privileges. 

After seeing literally dozens of people struggling with this type of thing, I 
believe it's better to separate out the idea of getting the bits on the system 
from configuring the application. If your design, for example, was that first 
run of the app required a configuration step then you'd be running a normal 
user mode program that could be tested and debugged easily, offer a choice of 
credentials (Windows or SQL), attempt to connect with them and report 
reasonable errors, not worry about install failure and rollback, allow the user 
to install the app without *requiring* that the remote server be setup first, 
allow the user to change the remote server if it crashes, and probably a bunch 
of other things I've forgotten related to upgrades, patches, repair because you 
didn't get the condition on your custom action quite right. 


Phil Wilson 


-----Original Message-----
From: Sagar1111 [mailto:sagarkavitak...@gmail.com] 
Sent: Thursday, June 17, 2010 11:09 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Deferred custom action Impersonation.


Thanks Phil, 


1.Does that mean if my deferred custom action has to execute a sql script on
another machine using windows authentication of current user i need to have
impersonate="yes" for that deferred custom action?


2.Using SQLExtension of wix how does a sql database gets created using
windows authentication on another machine (when i dont provide a user
attribue to sql database)
Is it that the customaction creating the database is running with
impersonate="yes" mode?


-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Deferred-custom-action-Impersonation-tp5191516p5192082.html
Sent from the wix-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


*** Confidentiality Notice: This e-mail, including any associated or attached 
files, is intended solely for the individual or entity to which it is 
addressed. This e-mail is confidential and may well also be legally privileged. 
If you have received it in error, you are on notice of its status. Please 
notify the sender immediately by reply e-mail and then delete this message from 
your system. Please do not copy it or use it for any purposes, or disclose its 
contents to any other person. This email comes from a division of the Invensys 
Group, owned by Invensys plc, which is a company registered in England and 
Wales with its registered office at Portland House, Bressenden Place, London, 
SW1E 5BF (Registered number 166023). For a list of European legal entities 
within the Invensys Group, please go to 
http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77. 
You may contact Invensys plc on +44 (0)20 7821 3848 or e-mail 
inet.hqhelpd...@invensys.com. This e-mail and any attachments thereto may be 
subject to the terms of any agreements between Invensys (and/or its 
subsidiaries and affiliates) and the recipient (and/or its subsidiaries and 
affiliates).



------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to