Inno如何在安装完成时删除指定的文件夹(下的所有文件及子目录)??

删除安装目录下的任意文件夹及下的所有文件及子目录,
或者删除指定目录的文件夹,要如何做到呢?
谢谢!!

//删除文件    用 DeleteFile 只能删除一个文件,不能使用通配符来删除多个文件
DeleteFile(ExpandConstant('{app}abc.exe'));
//删除所有文件及文件夹
DelTree(ExpandConstant('{app}'), True, True, False);

//或者
[code]
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
  if CurUninstallStep = usUninstall then
  if MsgBox('您是否要删除用户配置信息?', mbConfirmation, MB_YESNO) = IDYES then
  //删除 {app} 文件夹及其中所有文件
  DelTree(ExpandConstant('{app}'), True, True, True);
end;

[InstallDelete]
Name: {app}; Type: filesandordirs

[UninstallDelete]
Name: {app}; Type: filesandordirs

原文地址:https://www.cnblogs.com/joean/p/4881221.html