Inno setup 删除指定文件

矫情吗;* 2023-09-29 14:10 21阅读 0赞

Inno setup 删除指定文件

  • 方式一
  • 方式二

方式一

  1. [UninstallDelete]
  2. ;删除文件,{
  3. app}:安装目录
  4. Type: files; Name: "{app}\vcruntime140d.dll";
  5. Type: files; Name: "{app}\ucrtbased.dll";
  6. ;删除文件夹
  7. Type: filesandordirs; Name: "{app}";

方式二

  1. [code]
  2. procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
  3. begin
  4. //删除文件夹
  5. DelTree(ExpandConstant('{
  6. app}\platform'), True, True, True);
  7. //删除文件
  8. DeleteFile(ExpandConstant('C:\a.txt'));
  9. DeleteFile(ExpandConstant('{
  10. app}\c.txt'));
  11. end;

发表评论

表情:
评论列表 (有 0 条评论,21人围观)

还没有评论,来说两句吧...

相关阅读