[wix-users] Rollback of SqlScripts not happening on error

Thom Leigh tjleigh at outlook.com
Mon Mar 5 05:32:50 PST 2018


Create a script that does the reverse of the install script, and set that
script to be executed on install rollback.


On Mon, 5 Mar 2018, 07:37 Ven H via wix-users, <
wix-users at lists.wixtoolset.org> wrote:

> I have an MSI which has 4 SQL scripts for creating 4 different tables. In
> my 3rd SQL script, I gave the same table name as the one in the first
> script by mistake, for create table statement. When the installer ran, it
> executed the first 2 SQL scripts and created those two tables. When it was
> running the 3rd script, it found that the table already exists and threw an
> error. Then on clicking Ok on that error pop up, it showed the finish
> dialog saying no changes have been made to the system. I checked the Add /
> Remove Programs and indeed, my application was not listed as installed.
> But, when I went to the DB, I could see the two tables still got created,
> in spite of the exception. I am surprised to see this. Isn't it supposed to
> rollback those scripts / tables also? I have given ContinueOnError=no on
> all the scripts. Is this a bug or it is expected? Can anyone please explain
> how to workaround this behavior? If an error occurs during the execution of
> one of the scripts, I would basically like to rollback the other executed
> scripts also. How can I achieve this?
>
>
>
> Regards,
> Venkatesh
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-users mailing list