4

I'm using Advanced Installer to create my installer. My application creates a folder for cache which is not controlled by the installer. My question is; how can I remove a folder that is not handled/controlled by Advanced Installer?

I've already looked here but no luck: http://www.advancedinstaller.com/user-guide/qa-remove-file-or-folder.html

Thanks,

Almir

Almir
  • 167
  • 1
  • 2
  • 6
  • Custom actions can perform the cleanup if you don't want to create the folder at install time. VBScript is very simple and effective if all you need to do is verify that the folder exists and then delete it. – adamdc78 May 28 '15 at 20:57

2 Answers2

3

You can delete a folder that was not created by advanced installer with two different ways:

  1. Add a new custom Action with sequence (.vbs or .js) to remove that folder.
  2. Go to Files and Folders . Add a Regular New Folder to the path where that folder exists. Select that folder > Right Click > Properties. On the Properties tab disable the options : Create folder on target machine and Install folder content into the parent folder. On the Operations Tab enable the Option "Remove Folder"

For the Operation List select the Option "Always remove folder (even if its not empty). Choose the Component and the Remove on which component.

Hope this helps.

2

The article you linked is quite old, the latest version of Advanced Installer has now built-in support for removing folders like the one you have (i.e. not created by the installation, but by the app). Take a look at the following article, on folder removal operations.

EDIT:

No, you can configure it to not create the folder. As in this sample project, folder test. To do that you first create the folder, then configure the removal operation and hit OK. Then right click on the folder and select Properties, and from the first tab untick the option "Create folder on target machine".

The info about the removal operation will not be removed from our website and it is also a part of the offline user guide from Advanced Installer, so how ever is using version 12.1 will still have it.

We remove from the website only articles for features that no longer exist, and in that case it is useless for me to include detailed steps here if the GUI from Advanced Installer will be different, or the feature completely removed (which I doubt it will be the case with this one).

Bogdan Mitrache
  • 10,536
  • 19
  • 34
  • Doesn't this still force the installer to create the folder at install time? Also, best to include the relevant pieces of information in your answer as that link could be moved/removed at any time (I realize that at this time, you're part of the organization which maintains that knowledge base). – adamdc78 May 28 '15 at 20:56