That would be nice but given the way that Windows Installer executes custom 
actions, you need to create the rollback scripts yourself, a la 
SqlString/@RollbackOnUninstall or SqlScript/@RollbackOnUninstall

_____________________________________________________________
 Short replies here. Complete answers over there: http://www.firegiant.com/


-----Original Message-----
From: Nick Ramirez [mailto:nickra...@hotmail.com] 
Sent: Monday, October 27, 2014 7:47 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] SqlDatabase does not recreate database during rollback of 
uninstall

This may be a weird case, but here goes...

I have the following SqlDatabase element, from the SqlExtension:

<sql:SqlDatabase Id="sqlDatabase_MyDatabase"
                         Server="."
                         Instance="MySqlInstance"
                         Database="MyDatabase"
                         CreateOnInstall="yes"
                         CreateOnReinstall="yes"
                         DropOnUninstall="yes"
                         ContinueOnError="yes" />

Steps I took:

1. Install the MSI --> database is created 2. Open an elevated command prompt 
3. Uninstall using WIXFAILWHENDEFERRED=1:
    msiexec /x MyInstaller.msi WIXFAILWHENDEFERRED=1 4. PROBLEM: The database 
was uninstalled correctly. However, since I triggered a rollback, shouldn't it 
have been resurrected?

I'm using WiX 3.8. Any one seen this? Where the rollback of an uninstall does 
not re-create the database? Is this the expected behavior?

Note: I have set ContinueOnError to "yes" because otherwise I get into a 
situation where the database is removed during an uninstall (i.e. rollback does 
not recreate it). Then, subsequent attempts to uninstall fail because database 
no longer exists and cannot be removed.

Note 2: I have set DropOnUninstall to "yes" because under normal circumstances, 
I do want to drop the database. It's only during a rollback of the uninstall 
that I think it should be "un-removed".

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to