Leo.Zhou
Leo.Zhou

Reputation: 205

Deleting log files from all user profiles during uninstallation in Inno Setup

My app writes log files in application data folder of every local account. I'd like to delete them all during uninstallation. Seems I can't just add a UninstallDelete section like this:

Type: filesandordirs; Name: "{sd}\Users\\*\AppData\Roaming\MyLogFolder"

Or can I iterate over all user accounts and delete my log folders one by one. I just have no idea how to do it in Inno Setup script. Thanks!

Upvotes: 1

Views: 319

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202474

You definitely cannot use wildcards in directory components of a path.

You have to write a code to delete the logs from individual profiles, one by one. For an example code, see:
Inno Setup Create individual shortcuts on all desktops of all users

Upvotes: 2

Related Questions