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