Deleting files cause empty APPDIR. - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

elanius
Posts: 38
Joined: Fri May 15, 2009 9:49 am

Deleting files cause empty APPDIR.

Hi All

Here is my problem.
My application can download during life some files which are not part of installation of course. So I made Custom Action which check files which remained in APPDIR and remove it. I check only one kind of files (updates). If there would be something else I left it there.

So problem is that if my CA find something which can delete and do it than unistall continue and doesn't remove empty APPDIR. I don't understand, because if my CA do nothing than APPDIR is deleted properly, but if do than APPDIR stay there empty.

Yes I can extend my CA to delete also APPDIR but this is not solution for me.

Another question: Can MSI delete files which doesn't belong to product without calling CA?

thanks for any reply.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Deleting files cause empty APPDIR.

Hello,

You can use our Uninstall Cleanup wizard to achieve this. Simply go to "Files and Folders" page, then right click your "Application Folder", select "Uninstall Cleanup". Select the "Delete folder and all its contents" option and all files and folders will be removed upon uninstall regardless of whether they are registered with Windows Installer or not.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
elanius
Posts: 38
Joined: Fri May 15, 2009 9:49 am

Re: Deleting files cause empty APPDIR.

Thanks

I am afraid this feature is not part of my version which is 5.1.1. But I found in properties of Application Folder tab "Remove" and I am trying do something with this but without any good result now.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Deleting files cause empty APPDIR.

Hello,

The "Uninstall Cleanup" feature has been available since Advanced Installer 7.0. If your maintenance plan does not cover this version, you can upgrade your maintenance plan from here. If this is not an option for you, you could try placing your custom action under the InstallInitialize standard action so it runs before the standard actions that remove the files and folders.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
elanius
Posts: 38
Joined: Fri May 15, 2009 9:49 am

Re: Deleting files cause empty APPDIR.

Thanks, this solution works for me.

Return to “Common Problems”