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

Edwin Castro egcastr at gmail.com
Tue Mar 6 10:05:34 PST 2018


That is correct. That statement really applies for all custom action cases.

--
Edwin G. Castro

On Tue, Mar 6, 2018 at 5:06 AM, Ven H via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> This would mean I would have to write two scripts for each case, one for
> success scenario and one for handling rollback in case of failure, right?
>
> Regards,
> Venkatesh
>
> On Mon, Mar 5, 2018 at 7:02 PM, Thom Leigh <tjleigh at outlook.com> wrote:
>
> > 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/
> >>
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-users mailing list