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!

thomaslevesque
Posts: 4
Joined: Mon Jan 27, 2020 4:03 pm

Cleanup not removing additional files

My app writes some data (database, user settings, etc) in subfolders of the Application Data folder. During uninstall, I'd like to remove those files (after asking the user). I set it up like this, using the "Uninstall Cleanup" wizard:
ai-cleanup.png
ai-cleanup.png (100.42 KiB) Viewed 4124 times
However, when I uninstall the app, the data and logs folders, and their contents, are not removed.

What am I missing?

Thanks
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Cleanup not removing additional files

Hello and welcome to Advanced Installer forums,

I have tested this just now and everything worked as expected for me.

First of all, as you can see, the folder removal happens only if a component is uninstalled. Given this scenario, could you please create (if not already created) a verbose log of the installation process and forward it to me for further investigations (also, I will need the name of the component, if possible)?

This might happen if the component you have selected is not marked for uninstallation.

Looking forward to hearing from you.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
thomaslevesque
Posts: 4
Joined: Mon Jan 27, 2020 4:03 pm

Re: Cleanup not removing additional files

Hi Catalin,

Thanks for your reply. Actually, looking at the logs made me realize my mistake. I thought "Application Data" in the Files and Folders view referred to the application-specific folder in AppData/Roaming, but it's actually the AppData/Roaming folder itself.

So I assume I need to do something like this instead:
ai-appdata.png
ai-appdata.png (6 KiB) Viewed 4120 times
However, it looks like the placeholders are not replaced, it uses the values "[Manufacturer]" and "[ProductName]" literally... How can I solve this?
thomaslevesque
Posts: 4
Joined: Mon Jan 27, 2020 4:03 pm

Re: Cleanup not removing additional files

Ah, never mind, I got it working.
I had to use "[|Manufacturer]" and "[|ProductName]" as the placeholders.
BTW, why do I sometimes need to use "[|name]" and sometimes just "[name]"? What's the rule to know which to use?
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Cleanup not removing additional files

Hello,
Thanks for your reply. Actually, looking at the logs made me realize my mistake. I thought "Application Data" in the Files and Folders view referred to the application-specific folder in AppData/Roaming, but it's actually the AppData/Roaming folder itself.
Indeed, you are right, the "Application Data" folder basically represents the %appdata% folder, which is, as you have mentioned, the "AppData\Roaming" folder.

For more information about this, please have a look over our "Paths to the folders in the Files and Folders page" article which I think you may find useful.
However, it looks like the placeholders are not replaced, it uses the values "[Manufacturer]" and "[ProductName]" literally... How can I solve this?
In what regards this, as you have mentioned, the properties should be written as this:

Code: Select all

[|PROPERTY]
BTW, why do I sometimes need to use "[|name]" and sometimes just "[name]"? What's the rule to know which to use?
A Windows Installer property can be used in two types of fields:

- Formatted type fields

- Pseudo-Formatted type fields

Basically, the main difference between them is the following:

- properties inserted in formatted type fields are resolved at runtime

- properties inserted in pseudo-formatted type fields are resolved at build time

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
thomaslevesque
Posts: 4
Joined: Mon Jan 27, 2020 4:03 pm

Re: Cleanup not removing additional files

Ah, I see, thanks for the clarification!
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Cleanup not removing additional files

You are always welcome!

I am glad I could help.

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

Return to “Building Installers”