Hi To do the rollback via the WIX Sql tools
1. You need to have a SqlScript or SqlString that has RollbackOnInstall (and maybe RollbackOnReinstall) set. This schedules the Sql to be run when rolling back. It needs to be scheduled prior to the SqlScript that adds the role. The TSQL for the rollback will be If user exists (...) Drop user from role One way to test this is to add an SqlString at the end of the SQL install and call "RAISERROR". You probably need to use RollbackOnReinstall only if you are using Minor Upgrades or expect to deal with this if people repair your application. Michael -----Original Message----- From: d8x...@hotmail.com [mailto:d8x...@hotmail.com] Sent: Tuesday, 13 October 2009 1:27 AM To: Wix-Users Subject: [WiX-users] SqlString roleback options I need to add an existing user to an existing SQL database role. I am not creating the database or any tables. If the user is already a member of the role my script will do nothing. My current Wix implementation works fine except I don't appear to have rollback (remove the user from the role if I added it). here is the psudo code for the sql script: if not exists (...) add user to role end if What, if any, are my options for providing roll back when using SqlString? Can I use the Sql Schema items available in Wix to determine if my script added the user to the role and if so remove the user from the role during rollback? I believe I can perform these actions via a C# custom action (haven't written it yet), but wanted to see if something similar could be done with the Wix tools. _________________________________________________________________ Hotmail: Trusted email with powerful SPAM protection. http://clk.atdmt.com/GBL/go/177141665/direct/01/ ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users