Ok.  I just submitted the following wix feature request which hopefully 
outlines clearly what we are seeing and what we would prefer to see.

https://sourceforge.net/tracker/index.php?func=detail&aid=2655321&group_id=105970&atid=642717

Subject = support defining multiple sql:String sequence attributes

Description = 
For sql:String statements currently what we find is that you must define just 
one attribute setting specifying the installer sequence you want it to be 
applicable for, e.g. 
  ExecuteOnInstall="yes" or RollbackOnUninstall="yes" or 
ExecuteOnUninstall="yes" or RollbackOnInstall="yes"

What we find if you define more that one sql:String statement attribute setting 
specifying the installer sequence you want it to be applicable for then only 
the last attribute setting gets used, e.g.
  ExecuteOnInstall="yes" RollbackOnUninstall="yes" only executes the specified 
sql:String during RollbackOnUninstall
  ExecuteOnUninstall="yes" RollbackOnInstall="yes" only executes the specified 
sql:String during RollbackOnInstall

This can be confusing to the wix developer many might expect, since it 
compiles, to be able to define more that one sql:String statement attribute 
setting specifying the installer sequence you want it to be applicable for.

What we would prefer is that you can define multiple sql:String statement 
attribute settings specifying the installer sequence you want it to be 
applicable for and have them all get used because it is common to want whatever 
sql:String statement that is used during install to also be executed during 
rollback of an uninstall.  Likewise it is common to want whatever sql:String 
statement that is used during uninstall to also be executed during rollback of 
an install, e.g. 
  ExecuteOnInstall="yes" RollbackOnUninstall="yes" executes the specified 
sql:String during Install and Rollback of Uninstall
  ExecuteOnUninstall="yes" RollbackOnInstall="yes" executes the specified 
sql:String during Uninstall and Rollback of Install


-----Original Message-----
From: Rob Mensching [mailto:r...@wixtoolset.org] 
Sent: Tuesday, February 24, 2009 10:17 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] any insights as to why sql extension commands 
containing public property references are not working

What you are seeing is a limitation in the code. I'm not sure that there 
is a real requirement behind the limitation but the code does expect 
things to behave the way you list. If you think it should be different, 
feel free to file a feature request with a clear statement of what you 
see and what you would prefer.

Robert O'Brien wrote:
> I agree getting the exec wrapped statements correct, required so we could 
> incorporate use of installer public properties in the sql statements, 
> required a couple of passes.
>
> What we've found in testing of this build output is that everything worked 
> once I limited the sql:String statements to having just 
> ExecuteOnInstall="yes" in the one and just ExecuteOnUninstall="yes" in the 
> other, vs ExecuteOnInstall="yes" RollbackOnUninstall="yes" in the one and 
> ExecuteOnUninstall="yes" RollbackOnInstall="yes"in the other.
>
> So now it seems that if I want to cover RollbackOnUninstall and 
> RollbackOnInstall cases I'll have to add additional duplicate sql:String 
> statements for those cases vs being able to make single statements be dual 
> role statements like we were originally trying to make work.  Is that how 
> things are intended to work or might this be a sql:String statement 
> processing bug?
>
> -----Original Message-----
> From: Michael Osmond [mailto:mosm...@baytech.com.au]
> Sent: Wednesday, February 11, 2009 2:29 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] any insights as to why sql extension commands 
> containing public property references are not working
>
> Robert,
>
> Just one observation, are you sure that the difference in between using
> create (in the exampel that works) and wrapping the create inside an
> exec command (in the example that fails) is not the problem.  Both look
> okay to me, but I have had fun in the past with getting exec('strings')
> to do what I wanted.
>
> Michael
>
> -----Original Message-----
> From: Robert O'Brien [mailto:robert.obr...@microsoft.com]
> Sent: Thursday, 12 February 2009 5:48 AM
> To: 'General discussion for Windows Installer XML toolset.'
> Subject: Re: [WiX-users] any insights as to why sql extension commands
> containing public property references are not working
>
> p.s.   looking at my verbose logs searching for "ExecuteSqlStrings" hits
> I only see "RollbackExecuteSqlStrings" hits containing both the sql
> login and db user settings I want applied during install ( and during
> component uninstall rollbacks) as well as the settings I want applied
> during uninstall ( and during component install rollbacks ).
>
>
> q1 - is having the sql:String attribute pair ExecuteOnInstall="yes"
> RollbackOnUninstall="yes" correct to control having the specific setting
> applied during installs and also during component uninstall rollbacks?
>
> q2 - is having the sql:String attribute pair ExecuteOnUninstall="yes"
> RollbackOnInstall="yes" correct to control having the specific setting
> applied during uninstalls and also during component install rollbacks?
>
> From: Robert O'Brien
> Sent: Wednesday, February 11, 2009 11:28 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: any insights as to why sql extension commands containing public
> property references are not working
>
> Any insights as to why the following sql extensions commands that create
> a sql login and db user setting work
>
> <Property Id="DATABASESHOST" Value="localhost">
>
> <sql:SqlDatabase Id="MasterDatabase" Database="master"
> Server="[DATABASESHOST]" />
>
> <sql:SqlDatabase Id="Database1" Database="MyDeliverableDatabase"
> Server="[DATABASESHOST]" />
>
> <sql:SqlString Id="CreateLoginNetworkServiceDatabase1"
> SqlDb="MasterDatabase" SQL="create login [\[]NT AUTHORITY\NETWORK
> SERVICE[\]] from windows" ContinueOnError="yes" ExecuteOnInstall="yes"
> />
>
> <sql:SqlString Id="CreateUserNetworkServiceDatabase1" SqlDb="Database1"
> SQL="create user [\[]NT AUTHORITY\NETWORK SERVICE[\]] for login [\[]NT
> AUTHORITY\NETWORK SERVICE[\]]" ContinueOnError="yes"
> ExecuteOnInstall="yes" />
>
> <sql:SqlString Id="AddRoleMembershipNetworkServiceDatabase1"
> SqlDb="Database1" SQL="sp_addrolemember 'NSRunService', 'NT
> AUTHORITY\NETWORK SERVICE'" ContinueOnError="yes" ExecuteOnInstall="yes"
> />
>
> but the following similar sql extensions calls where I have the sql
> login and db user statements making use of a public property value + the
> statements configured to also execute on uninstall rollback, do not
> work?
>
> <Property Id="DATABASESHOSTNAME" Value="localhost">
>
> <Property Id="DATABASESLOGINLOCALACCOUNT" Value="NT AUTHORITY\NETWORK
> SERVICE" />
>
> <sql:SqlDatabase Id="Master" Database="master"
> Server="[DATABASESHOSTNAME]" />
>
> <sql:SqlDatabase Id="Database1" Database="MyDeliverableDatabase"
> Server="[DATABASESHOSTNAME]" />
>
> <sql:SqlString Id="Database1CreateLoginLocalAccount" SqlDb="Master"
> Sequence="1" SQL="exec('create login
> [\[][DATABASESLOGINLOCALACCOUNT][\]] from windows')"
> ExecuteOnInstall="yes" RollbackOnUninstall="yes" ContinueOnError="yes"
> />
>
> <sql:SqlString Id="Database1CreateUserLocalAccount" SqlDb="Database1"
> Sequence="2" SQL="exec('create user [\[][DATABASESLOGINLOCALACCOUNT][\]]
> for login [\[][DATABASESLOGINLOCALACCOUNT][\]]')" ExecuteOnInstall="yes"
> RollbackOnUninstall="yes" ContinueOnError="yes" />
>
> /eom
>
> ------------------------------------------------------------------------
> ------
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use
> existing skills and code to build responsive, highly engaging
> applications that combine the power of local resources and data with the
> reach of the web. Download the Adobe AIR SDK and Ajax docs to start
> building applications today-http://p.sf.net/sfu/adobe-com
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code to
> build responsive, highly engaging applications that combine the power of local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>   

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to