[UninstallDelete] dirifempty recursive directories

17 views
Skip to first unread message

Alessandro Marinuzzi

unread,
Oct 18, 2021, 11:17:15 AM10/18/21
to inno...@googlegroups.com
Hello!

I' trying to delete on Uninstall section a recursive folder but InnoSetup 6.2.0 only delete first level of directory and do not perform a recursive deletion.

[UninstallDelete]
Type: dirifempty; Name: "{app}\lang";


If inside a lang folder there is another folder (empty) the lang folder will not removed.

I'd like remove only the folder structure is full empty

app/lang (empty)
app/lang/it (empty)

if app/lang/it is empty the folder lang will not be removed...

There is trick?

I' tried also:

begin
  case CurUninstallStep of   
    usPostUninstall:
      begin
      ...
      ....
      DelTree(ExpandConstant('{app}\lang'), True, True, True);

but remove also not empty dir...

Thanks.

Alessandro

Alessandro Marinuzzi

unread,
Oct 18, 2021, 12:10:05 PM10/18/21
to inno...@googlegroups.com
[UninstallDelete]
Type: dirifempty; Name: "{app}\lang\*.*";

Did the trick

Thanks
-- 

Alessandro Marinuzzi - https://www.alecos.it/
Reply all
Reply to author
Forward
0 new messages