Page 1 of 1

Recursively Delete Files doesn't delete anything

Posted: Thu May 03, 2007 5:56 am
by stefan
Hi,

I have an installer that installs a few components and that works mostly fine. However, upon remove, a lot of files are not removed, including files from all components(start menu shortcuts are removed). I tried to use Recursively Delete Files $TARGETDIR$ before Apply Uninstall, but that does nothing. (Actually, I'd like to simply have all files removed that were installed) After installation, I immedately uninstall, without starting or opening any of the content that has been installed. So I guessnothing is 'still open'. Any idea why that happens or what else I can do?

Thanks.
Stefan

Posted: Thu May 03, 2007 5:07 pm
by MichaelNesmith
Does it do nothing, or does it not remove some locked files?

Also try rebooting - MSI will remove locked files after a reboot.

That is, unless they were not installed by your setup and created by your application instead. In that case you can use the Delete Files MSI command.

Posted: Fri May 04, 2007 2:25 am
by stefan
Well, no, the files are definitely not created by the aplication, they are not write protected (if that matters) and they are not removed upon reboot.
Delete files is not that usable since it's a lot of files and names could change over the production process, but it doesn't delete any files either.
Recursively delete files really does nothing, all the files that were there before inserting the command are still there. The files are most probably not locked, because I didn't start the application and the files are not used by any other application.

Thanks for further suggestions,
Stefan

Posted: Fri May 04, 2007 2:37 am
by stefan
I tried popping up a messagebox with TARGETDIR upon uninstallation and I get ' C:\\Programme\\\\Application '. Right now, I don't know where the double-backslash comes from, but might this be a reason?

Posted: Fri May 04, 2007 2:58 am
by stefan
Seems like that is not the reason. I treid setting TARGETDIR to the right dir manually before issuing delete commands, but that doesn't help either.

Recursively Delete Files doesn't delete anything

Posted: Wed May 16, 2007 4:08 pm
by interloper
stefan wrote:Seems like that is not the reason. I treid setting TARGETDIR to the right dir manually before issuing delete commands, but that doesn't help either.
Make sure you specify wildcards to the command. It also will not delete the top-level directory specified. You need to use the Call DLL plugin to call RemoveDirectoryA directly. So in your case you'd use:

$TARGETDIR$\\*.*

int.