rustyshelf
Posts: 6
Joined: Thu Mar 30, 2006 1:55 am

Delete a non-empty directory, and all it's subdirectories

Hi,

I'm trying to figure out how to (on installation) delete a directory (if it exists) and all its sub-directories, which all contain files. I have figured out that you can't do it as a property of the directory (because it's not empty). I have also figured out the DOS command that I need:
rd /s /q directoryName
But I can't figure out how to add this as a custom action, because it's not an EXE or a VB script.

Is there any easy way to do this? Am I missing something :?:
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi,

You could use a a custom action that executes a VBScript.

This topic had been discussed before on the Advanced Installer forums. For en example of such a VBScript and for more details on how to set up the custom action please see the following post:
http://www.advancedinstaller.com/forums ... .php?t=799

Please let me know if you encounter any problems.

Best regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”