@John: I completely understand why the util:RemoveFolderEx action works the way it works, and for many applications that is the right way to go, and that's why I had used it to begin with. Unfortunately for this particular app it was simply unacceptable to be stuck for 45 minutes during uninstall or even upgrade (where none of the files are being deleted but the action still enumerates them all) because of the unusually large number of files we're dealing with, so I opted for the custom action in favor of execution time but at the cost of the tight integration with the MSI process. I was also hugely simplifying things in my previous reply, I am handling several locked file and other error cases and I won't just error out as soon as I hit the first snag.
@Jeremy: It doesn't. Taking a copy of all the files before deleting them to be able to roll back a failed uninstall was not really an option here, and the app does also not depend on these files, they are mostly used for caching purposes. If that whole folder gets wiped out it can be easily recreated by the app. So not being able to roll back this delete operation was an acceptable compromise. // Sascha On Fri, May 9, 2014 at 10:31 AM, Jeremy Farrell <jeremy.farr...@oracle.com>wrote: > How does rollback work with your CA? > > > From: Sascha Sertel [mailto:sascha.ser...@gmail.com] > > > > Yes, what it is getting hung up on is enumerating a hundred > > thousand files one by one and adding them up to a giant string > > that is passed on to the MSI engine. > > > > I looked at the RemoveFolderEx C++ implementation and it > > confirmed all my suspicions, so I went ahead and took it out > > and created my own managed custom action instead, which does > > the whole thing in one line: > > Directory.Delete(path, true) :-) > > > > Of course I added proper error handling and session return > > codes etc. but now it's super fast and doing exactly what > > I needed it to do. I'll probably do a blog post on it, I'll > > update this thread with the link when it's up. > > > ------------------------------------------------------------------------------ > Is your legacy SCM system holding you back? Join Perforce May 7 to find > out: > • 3 signs your SCM is hindering your productivity > • Requirements for releasing software faster > • Expert tips and advice for migrating your SCM now > http://p.sf.net/sfu/perforce > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users