Inno设置仅在包含文件时才要求删除文件夹

时间:2017-08-25 10:58:26

标签: inno-setup

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
Infos : integer;
begin
  if DirExists(ExpandConstant('{app}\saves'))  then
  begin
  case CurUninstallStep of
    usUninstall:
      begin
        Infos := MsgBox('Do u want remove saves?', mbConfirmation, MB_YESNO)
        if Infos = IDYES then
        begin
        DelTree(ExpandConstant('{app}') +'\saves', True, True, True);
        end;
      end;
    end;
  end;
end;`

我希望inno仅在文件夹非空时才要求删除保存文件夹。这有可能吗?

0 个答案:

没有答案
相关问题