santoshadvanceinst
Posts: 22
Joined: Mon Nov 05, 2012 12:19 pm

Delete folder during uninstall

Hi,

I want to delete folders that are created by my application during processing. There are multiple folders created but all are under application directory and start with a particular name like Output_*, Input_* etc. I want to make sure that I am able to delete all folders that start with "Input_ " string during uninstall process.

Please let me know the ways to achieve this.

Regards,
Santosh
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Delete folder during uninstall

Hello Santosh,

The folders created in the "Files and Folders" page are automatically deleted during the "Remove resources" action gorup --> "Remove folders" standard action (during the "Uninstall" process).

If this does not meet your requirements, you can try to create your own custom action (e.g. "Execute inline script code"; "Run PowerShell inline script"; "Run PowerShell script file") which will do what you want. You can place this after the "Remove folders" standard action in the "Install Execution Stage" and then uncheck the "Install" and "Maintenance" checkboxes from under the "Execution Stage Condition".

Here are some articles I think you may find useful:

- https://www.advancedinstaller.com/user- ... ipt-inline

- https://www.advancedinstaller.com/user- ... ell-script

- https://www.advancedinstaller.com/user- ... -from-file

Hope this helps.

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”