方式一
[UninstallDelete]
;删除文件,{app}:安装目录
Type: files; Name: "{app}\vcruntime140d.dll";
Type: files; Name: "{app}\ucrtbased.dll";
;删除文件夹
Type: filesandordirs; Name: "{app}";
方式二
[code]
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
//删除文件夹
DelTree(ExpandConstant('{app}\platform'), True, True, True);
//删除文件
DeleteFile(ExpandConstant('C:\a.txt'));
DeleteFile(ExpandConstant('{app}\c.txt'));
end;
本文详细介绍了Innosetup中两种删除指定文件和文件夹的方式:一种是通过配置文件直接指定要移除的文件和文件夹路径,另一种是在程序执行阶段动态调用DelTree和DeleteFile函数。适合Innosetup开发者进行应用卸载操作。
909

被折叠的 条评论
为什么被折叠?



