wix Managed bootstrapper: Rollback failing


I have multiple EXECPackages chained in my managed bootstrapper, for example:

<ExePackage Id="Test1" SourceFile="D:\Test\TestBatch.bat" Vital="yes" Compressed="yes" 
<ExePackage Id="Test2" .../>

I want my rollback to execute the Uninstall command. The generated log file has the following info:

Rollback:uninstall. Applying rollback package: Test2, action: Uninstall, path: C:\ProgramData\Package Cache\AD944C8E8D75C79F57819C331F46D15B4CFD9172\TestBatch.bat, arguments: '"C:\ProgramData\Package Cache\AD944C8E8D75C79F57819C331F46D15B4CFD9172\TestBatch.bat" Testuninstall2' [24F4:246C][2013-06-05T14:45:10]e000: Error 0x80070003: Failed to CreateProcess on path: C:\ProgramData\Package Cache\AD944C8E8D75C79F57819C331F46D15B4CFD9172\TestBatch.bat [24F4:246C][2013-06-05T14:45:10]e000: Error 0x80070003: Failed to execute EXE package. [1654:27A8][2013-06-05T14:45:10]e000: Error 0x80070003: Failed to configure per-machine EXE package.

I realized that when rollback is triggered (Result.Cancel), the cached folder that contains the Exe package payload is deleted from C:\ProgramData\Package Cache.

However this used to work before.

asked on Stack Overflow May 29, 2013 by microsoftprogrammer • edited Jul 1, 2013 by Yan Sklyarenko

1 Answer


The UninstallCommand is executed on rollback if the package is being installed. I've seen this issue occur when the same executable is used for multiple ExePackage elements in a single Chain. The way that the Burn engine caches packages uses the hash of the executable to determine the location. Thus if you put the same executable in Chain it can be prematurely removed. Make sure every executable package is unique in your Bundle.

PS: It is highly recommended that you have a DetectCondition on the ExePackage

answered on Stack Overflow Jun 22, 2013 by Rob Mensching

User contributions licensed under CC BY-SA 3.0