In general, the table-driven approach that RemoveFolderEx follows is superior. First, it handles locked files appropriately. Second, it does the deletes at the same time and sequence as other deletes are being performed by the installer. Third, it is much safer.
Yes, if all the files and subfolders have no locks or special attributes on them, you can easily delete a folder and its children with one call. But having personally experienced what happens when a buggy call to such code is made (created by an associate no longer with the team), I can tell you that the speed with which my test machine had its "C:\Program Files" tree deleted was truly impressive. As was my anger and the day it took to re-image the machine. -- John Merryweather Cooper Build & Install Engineer – ESA Jack Henry & Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -----Original Message----- From: Sascha Sertel [mailto:sascha.ser...@gmail.com] Sent: Friday, May 9, 2014 12:11 PM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] RemoveFolderEx really slow on large folders 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. // Sascha On Thu, May 8, 2014 at 12:06 PM, Nick Ramirez <nickra...@hotmail.com> wrote: > Is it getting hung up on something? When you uninstall with logging, > does the log show anything happening that takes a long time around > where it calls RemoveFiles? > > > > -- > View this message in context: > http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/RemoveFo > lderEx-really-slow-on-large-folders-tp7594451p7594615.html > Sent from the wix-users mailing list archive at Nabble.com. > > > ---------------------------------------------------------------------- > -------- 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 NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. ------------------------------------------------------------------------------ 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