Richard,
Thanks for the good suggestion, but I can't for the life of me figure out
how to implement what you suggest.
I have the following:
<CustomAction Id="ForceError" Error="1602"/>
<CustomAction Id="RollbackReportAction" BinaryKey="REPORTDLL"
DllEntry="RollbackInstallReport" Execute="rollback"/>
<InstallExecuteSequence>
<Custom Action='RollbackReportAction'
After='InstallInitialize'></Custom>
<Custom Action="ForceError" After="RollbackReportAction"></Custom>
</InstallExecuteSequence>
<AdminExecuteSequence>
<Custom Action='RollbackReportAction'
After='InstallInitialize'></Custom>
<Custom Action="ForceError" After="RollbackReportAction"></Custom>
</AdminExecuteSequence>
<UI>
<Error Id="1602">We have a problem</Error>
</UI>
In the log, I see that the ForceError CA returns 3... but it doesn't trigger
a rollback.
Action ended 10:56:34: ForceError. Return value 3.
MSI (s) (BC:34) [10:56:34:044]: Machine policy value 'DisableRollback' is 0
MSI (s) (BC:34) [10:56:34:044]: Note: 1: 1402 2:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts
3: 2
MSI (s) (BC:34) [10:56:34:044]: Note: 1: 1402 2:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts
3: 2
MSI (s) (BC:34) [10:56:34:075]: Calling SRSetRestorePoint API.
dwRestorePtType: 13, dwEventType: 103, llSequenceNumber: 1019,
szDescription: "".
MSI (s) (BC:34) [10:56:34:169]: The call to SRSetRestorePoint API succeeded.
Returned status: 0.
MSI (s) (BC:34) [10:56:34:169]: Unlocking Server
Action ended 10:56:34: INSTALL. Return value 3.
...
Richard-45 wrote:
>
> You can test rollback by putting a custom action of type 19 (fail) at
> the end of your install transaction, right before InstallFinalize.
> Put a condition on this action this is normally false, so you can set
> a public property from the command line to force rollback. This is
> the best way to test custom actions that modify the system and have a
> corresponding rollback action to undo the modification.
> --
> "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
> <http://www.xmission.com/~legalize/book/download/index.html>
>
> Legalize Adulthood! <http://blogs.xmission.com/legalize/>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> WiX-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
--
View this message in context:
http://www.nabble.com/How-to-test-rollback--tp15238586p15296979.html
Sent from the wix-users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users