inno setup删除文件的几种方式
- //删除 {app} 文件夹中的My Prog.exe
DeleteFile(ExpandConstant(’{app}\My Prog.exe’));
- //删除 {app} 文件夹及其中所有文件
DelTree(ExpandConstant(’{app}’), True, True, True);
- //删除 {app} 文件夹中的所有文件,但保留它本身
DelTree(ExpandConstant(’{app}’), False, True, True);
[Code]
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep = usDone then
if MsgBox(‘您是否要删除用户配置信息?’, mbConfirmation, MB_YESNO) = IDYES then
//删除 {app} 文件夹及其中所有文件
DelTree(ExpandConstant(’{app}’), True, True, True);
end;
[/Code]